GXInboundResponse does not detect exception
|Status:||Closed||Start date:||May 04, 2019|
|Assignee:||Manuele Simi||% Done:|
|Sprint:||zz - GXRest|
When returning an Error code from the service with:
At caller side, GXInboundResponse does not correctly detect the exception with the hasException() method.
#2 Updated by Manuele Simi 9 months ago
- Assignee changed from Manuele Simi to Lucio Lelii
- Status changed from In Progress to Feedback
- File Screen Shot 2019-05-06 at 8.56.41 AM.png added
I'm currently not able to reproduce the error. In my tests, exceptions are correctly detected.
I definitely need more information to investigate this issue. More specifically:
1) a pointer to the code on svn that throws the Exception service side
2) debug information on the GXInboundResponse returned by the request. For a comparison, I'm attaching a debug session where I show the response object and its members' values.
#6 Updated by Manuele Simi 9 months ago
- File Screen Shot 2019-05-07 at 12.13.43 AM.png added
I can't find an explanation to this issue. In my tests I can return a 401 with no problem as follows:
GXOutboundErrorResponse.throwException(new UserNotAuthorizedException("Error in methodTwo"),Response.Status.UNAUTHORIZED);
I even tried to reproduce the Exception hierarchy of the Storage Hub, but still I can return the code and attach the Exception (see the screenshot).
The only viable solution I see is to debug the createFolder() of the SH with the Jersey Test framework. Or we change the status code and that's it. I do not have other ideas how to investigate this issue.