Closed mattdelsordo closed 6 years ago
Another consideration here is that displaying all errors to the client in a human-readable way could lead to SQLI problems, since database errors get returned verbatim.
One more thing (that is only an issue without the log abbreviating claudia-local-api patch), printing logs to an image makes the console spit out the base-64 encoded image, which is incomprehensible and obscures the actual error messages.
Currently, endpoints that throw errors return the errors as a json or image message to the user in order to aid debugging and make it very visible that something went wrong. However, after some thought (and not being able to print error messages to vector tiles) I'm less confident in this design choice. My reasons for this are:
It might be a good idea to revisit error handling in the api module and convert thrown errors into meaningful status codes, instead of returning the error content with a 200.