Hello @ma1uta ! First thank you for implementing v2 API and supporting this project.
I have an improvement suggestion : I think ma1sd should response with 401 M_UNAUTHORIZED when the access_token is missing or invalid, as specified by the spec. It would allow clients to trying login in again (i.e. account/register) on such an error.
Today it's not a priority because matrix-js-sdk doesn't seem to handle 401, so if my is_access_token expires, it seems that riot doesn't try to register again. Still if they implement such behavior in the future they would need to have a 401 response. Right now ma1sd is answering with 500 and the following exception:
io.kamax.mxisd.exception.InvalidCredentialsException: Supplied credentials are invalid
Hello @ma1uta ! First thank you for implementing v2 API and supporting this project.
I have an improvement suggestion : I think ma1sd should response with 401 M_UNAUTHORIZED when the access_token is missing or invalid, as specified by the spec. It would allow clients to trying login in again (i.e. account/register) on such an error.
Today it's not a priority because matrix-js-sdk doesn't seem to handle 401, so if my is_access_token expires, it seems that riot doesn't try to register again. Still if they implement such behavior in the future they would need to have a 401 response. Right now ma1sd is answering with 500 and the following exception: io.kamax.mxisd.exception.InvalidCredentialsException: Supplied credentials are invalid
What do you think @ma1uta ?