You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The backend should handle errors as the error type if possible. With the current approach, a lot of code is duplicated.
See https://go.dev/doc/faq#nil_error for details.
However, we also want to transport the HTTP status code. This needs some more thinking and research.
It might be possible to have a generic handler function for the errors that takes the Response type as parameter via a suitable interface and can then return the correct response. With that, the handling code could possibly be much shorter.
The text was updated successfully, but these errors were encountered:
The backend should handle errors as the
error
type if possible. With the current approach, a lot of code is duplicated.See https://go.dev/doc/faq#nil_error for details.
However, we also want to transport the HTTP status code. This needs some more thinking and research.
It might be possible to have a generic handler function for the errors that takes the Response type as parameter via a suitable interface and can then return the correct response. With that, the handling code could possibly be much shorter.
The text was updated successfully, but these errors were encountered: