Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a better error page #93

Open
fvanderbiest opened this issue Jan 8, 2024 · 2 comments
Open

Display a better error page #93

fvanderbiest opened this issue Jan 8, 2024 · 2 comments

Comments

@fvanderbiest
Copy link
Member

Currently the gateway displays an unfriendly "Whitelabel Error Page" message when it crashes:

image

eg caused by:

Caused by: org.georchestra.ds.users.DuplicatedEmailException: there is a user with this email: [email protected]
	at org.georchestra.ds.users.AccountDaoImpl.insert(AccountDaoImpl.java:148) ~[georchestra-ldap-account-management-23.1-SNAPSHOT.jar:na]
	at org.georchestra.gateway.accounts.admin.ldap.LdapAccountsManager.createInternal(LdapAccountsManager.java:94) ~[classes/:23.1-SNAPSHOT]
	at org.georchestra.gateway.accounts.admin.AbstractAccountsManager.createIfMissing(AbstractAccountsManager.java:64) ~[classes/:23.1-SNAPSHOT]
	at org.georchestra.gateway.accounts.admin.AbstractAccountsManager.lambda$getOrCreate$0(AbstractAccountsManager.java:40) ~[classes/:23.1-SNAPSHOT]
	at java.base/java.util.Optional.orElseGet(Unknown Source) ~[na:na]

What would be a better way of handling such errors ?

@pmauduit
Copy link
Member

pmauduit commented Jan 8, 2024

@edevosc2c already wrote a documentation to handle this:
https://github.com/georchestra/georchestra-gateway/blob/main/docs/custom-error-pages.adoc

but I think it would be better to provide default customized pages (in the datadir ?)

@fvanderbiest
Copy link
Member Author

Awesome !
Yes, having default pages in the datadir sounds like a neat option

@edevosc2c edevosc2c changed the title Handle gateway crashes Handle gateway error pages Jan 9, 2024
@edevosc2c edevosc2c changed the title Handle gateway error pages Display a better error page Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants