Closed babolivier closed 4 years ago
Note that some places in gomatrixserverlib are already using the NotAllowed
error, but not sure if Dendrite has made full use of this distinguishment yet.
I've found this a nice pattern for simple errors. Much nicer than var ErrFooBar = errors.New(...)
: https://dave.cheney.net/2016/04/07/constant-errors
Is anyone working on this issue right now..??
Is anyone working on this issue right now..??
i am
Process errors from gomatrixserverlib and gomatrix correctly so that we don't respond 500 instead of e.g. 403, 404, etc.
Might I suggest adopting RFC 7807?
Also, I've been looking at this problem for my own applications, and came up with lpar/problem as an approach for making it easier to handle.
We're a lot better at this now, with internal APIs exposing their own error types and GMSL having more thorough error types. There's always room for improvement though so it's hard to know at what point this issue can be closed, so I'm deciding now.