Replies: 3 comments 4 replies
-
The big backtrace is the https://github.com/epinio/epinio/blob/main/pkg/api/core/v1/errors/errors.go#L86 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Logging of internal errors could possibly be done via a gin-gonic middle-ware running after the regular handler !? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Empty responses
Playing around with the APIs I've seen some response are not always returning a JSON, i.e. if you are not authorized then an empty body is returned:
This could cause some issues or problem with the unmarshalling of the response on client side, since you cannot rely on the status code or the body. You should do some error checking on the unmarshalling.
proposal
I would suggest to always return a JSON, and if the response is NOT in the range of the success (200/299, or redirects 300/399) but is >=400 then our API error is returned:
Errors
I've seen also that when the server is failing sometimes is throwing out the whole stacktrace. Usually you don't want to expose internal details, so I suggest to hide this information.
Empty logs
Also this information is NOT logged on the server side, that is much more an issue, since logs without details are not really useful.
Beta Was this translation helpful? Give feedback.
All reactions