Hello Team This is Aniket. I have been using hydra...
# talk-hydra
Hello Team This is Aniket. I have been using hydra with mysql for authentication. One problem that i have recently faced with introspect token api is that whenever my mysql is down for some reason then introspect token returns empty response and it does not return an error state so our application understands that the token is invalid and logs out the user. although we get mysql error in debug logs. Is this is a known issue on hydra? How do we proceed ahead with this?How do we take care of such cases? Thanks in advance.
👀 1
I was about to ask sth similar. For postgres I would consider postgres HA version. https://github.com/bitnami/charts/tree/master/bitnami/postgresql-ha. I think mysql has sth similar to the HA version
The issue could be anything, either MySQL is down or MySQL has reached its maximum connection limit. Shouldn’t hydra return internal server code instead of 401? So that client can make appropriate decisions based on the status code? https://github.com/ory/hydra/blob/e03a1fedccce48bad8b011bccd8d3a52ec0e4ad3/oauth2/handler.go#L442-L448 On line 444 I do receive that that mysql had max connections reached but on line 445 it sets the 401 response for the clients.
👍 1
So even a connect error would return 401 to the clients which I think should be of internal server error type.
👍 1