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
feat(error): Server error handler (DSP-710) #355
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok for me. Only that blinking thing while loading the error page I've mentioned in previous comment. If not easy thing to fix, might be moved to another task/bug.
src/assets/style/_elements.scss
Outdated
@@ -540,7 +540,7 @@ $gc-small: $form-width - $gc-large - 4; | |||
|
|||
.cdk-overlay-pane { | |||
.mat-dialog-container { | |||
max-height: 80vh !important; | |||
// max-height: 80vh !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't sure if we still need it and we have to fix the height in another way. But yes, let's delete this line 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 924fc3d
…thub.com/dasch-swiss/dsp-app into wip/dsp-710-handle-internal-server-error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks good but I strongly suggest that Mike checks the error messages.
As @flavens suggested: @mdelez can you check the error messages? Thanks! |
errorMessages: ErrorMsg[] = [ | ||
{ | ||
status: 0, | ||
message: "Undefined Error", | ||
description: `Maybe I'm a teapot, maybe not.<br> | ||
But anyway, something undefined went wrong.`, | ||
action: 'goback', | ||
image: 'dsp-error.svg' | ||
}, | ||
{ | ||
status: 403, | ||
message: "Forbidden", | ||
description: `This is not the content you were looking for.<br> | ||
Your request was valid but you do not have the<br> | ||
necessary permissions to access it.`, | ||
action: 'goback', | ||
image: 'dsp-error-403.svg' | ||
}, | ||
{ | ||
status: 404, | ||
message: "Not found", | ||
description: `This is not the content you were looking for.<br> | ||
But we couldn't find anything with this request.`, | ||
action: 'goback', | ||
image: 'dsp-error-404.svg' | ||
}, | ||
{ | ||
status: 500, | ||
message: "Internal Server Error", | ||
description: `The DaSCH Service Platform is not available at the moment.<br> | ||
An error has occured in a server side script, a no more specific message is suitable.`, | ||
action: 'reload', | ||
image: 'dsp-error-500.svg' | ||
}, | ||
{ | ||
status: 503, | ||
message: "Service unavailable", | ||
description: `The DaSCH Service Platform is not available at the moment.<br> | ||
The server is currently unavailable (overloaded or down).`, | ||
action: 'reload', | ||
image: 'dsp-error-503.svg' | ||
} | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdelez Here are the error messages defined...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wording improvements :)
It seems that the tests failing from time to time. The problem is the dialog box: |
@kilchenmann did adding the module in a49b63f help? Because it seems test failed again. |
resolves DSP-710 (s. discussion)
closes #311
Implementation of error handler service with following job:
Add error handler to all components and services where we do api requests (incl. refactoring of Imports)
Error test page
/teapot
with status 418 (easteregg)app-routing.module.ts
from 418 to another one (e.g. 403, 404, 500 or 503) to see the different error pagesTest the implementation of error handler:
/help
page because there we do not do db-relevant requests.Comment: We could add a link to https://status.dasch.swiss in one of the error 5xx page. So, user will see what's going on on the server. At the moment this service is only implemented for the prod server and not yet for the test (or staging) server which would be https://status.test.dasch.swiss (https://status.staging.dasch.swiss). Btw with this status page the ops-developer team will be informed when a service doesn't run anymore. So, we don't need a contact button anymore on the server error page to send this kind of error report.