Currently the http.service.ts tries to handle certain backend errors by itself and returns null if it does so.
This is bad because the caller will not be notified properly that a request failed and lacks information about the reasons for that. In case of a password reset which returns null on success it is completely impossible for the caller to determine if the request was successful.
While I think that it is okay to display a snackbar on fail we should change the following things here:
- Always throw if an error occurred with all information about the response
- Option to disable opening a snackbar on error
Especially 1. needs testing and maybe some considerations.
Currently the
http.service.tstries to handle certain backend errors by itself and returnsnullif it does so.This is bad because the caller will not be notified properly that a request failed and lacks information about the reasons for that. In case of a password reset which returns
nullon success it is completely impossible for the caller to determine if the request was successful.While I think that it is okay to display a snackbar on fail we should change the following things here:
Especially 1. needs testing and maybe some considerations.