arrowhead-f / client-java

Arrowhead Framework Client Skeletons in Java
https://forge.soa4d.org/plugins/mediawiki/wiki/arrowhead-f/index.php/Main_Page
Apache License 2.0
1 stars 6 forks source link

HTTP 415 currently gets mapped to a HTTP 500 error code #6

Closed eudyptula closed 5 years ago

eudyptula commented 5 years ago

If the server throws a NotSupportedException exception with the message "HTTP 415 Unsupported Media Type", the client currently gets the 500 status code back:

2019-02-18 09:17:11  INFO  {
  "errorMessage" : "class javax.ws.rs.NotSupportedException: HTTP 415 Unsupported Media Type",
  "errorCode" : 500,
  "exceptionType" : "GENERIC",
  "origin" : "https://192.38.56.154:9808/incoming",
  "documentation" : "https://github.com/hegeduscs/arrowhead/tree/4.0/documentation"
}
uzoltan commented 5 years ago

this would be the same for the core systems too. I will create a new exception mapper for them later this week when I have the time.

uzoltan commented 5 years ago

I pushed commits to both the repositories (core and client) which added a new exception mapper to handle this scenario.