microsoft / azure-spring-boot

Spring Boot Starters for Azure services
MIT License
374 stars 460 forks source link

AADAppRoleStatelessAuthenticationFilter Is throwing Servlet Exception which is indeed converted to Internal Server Exception by Spring and Exception Msg is missing #935

Closed vamshinarra closed 3 years ago

vamshinarra commented 4 years ago

Hello, I am using AADAppRoleStatelessAuthenticationFilter in my project and when a token expires the filter is throwing ServlerException which is in turn getting converted into Internal Server Error by Spring StandardWrapperValve where this Exception message was set null as given below

{ "timestamp": "2020-09-28T09:43:37.164+00:00", "status": 500, "error": "Internal Server Error", "message": "", "path": "/psp/request/sla_config" } Can Some one help how to handle Exceptions raised from the filter.

yiliuTo commented 4 years ago

Hi @vamshinarra , thanks for the reporting. We have fixed this bug here to send 401 instead of 500 for the expired token error. And you can wait for our next release for the bugfix.

vamshinarra commented 4 years ago

Thanks @yiliuTo May i know when is the next planned release.

yiliuTo commented 4 years ago

Hi @vamshinarra , sorry for my late reponse, if you want to test about the bugfix, you can use our nightly build version, which you can refer to this link. And as for our release plan, recently we are doing some changes on our package and artifactid names, so we will release a preview version covering this bugfix this week . And the stable version will be released several weeks after the preview.

chenrujun commented 3 years ago

Closing this issue. Because it's not active for a long time. If anyone have similar issue, please create issue in new repo: https://github.com/Azure/azure-sdk-for-java/issues