0

I have a custom error message for authorization failure in a spring boot application, it works fine in localhost but when deployed in azure it returns like this:

{
    "timestamp": TIMESTAMP,
    "status": 401,
    "error":"unauthorized",
    "message": "unauthorized",
    "path": "/testapplication"
}
askwer
  • 163
  • 13

1 Answers1

0

At present there is no such feature to have custom error messages in azure App Services. There has been a feature request planned for this. You can make a follow up comment on it from there or you can give a feed back HERE for feature request.

Check the below threads for related conversations.

  1. Spring Oauth2 returns 401 Unauthorized error with spring boot 2.0 - Stack Overflow
  2. java - Spring Security - 401 Unauthorized for token end point (/oauth/token) - Stack Overflow
  3. java - Spring Boot 2.0.3 Oauth2 Security: Getting 401 error even when using access token in header - Stack Overflow
SwethaKandikonda
  • 7,513
  • 2
  • 4
  • 18