Hi All.
I'm getting some difficulty with get the error message when I got an InternalServerError, from my REST service that is in the environment of my application.
My REST Service is using Jersey library (JAVA), and InternalServerErrors generated by an the code, following the best practices.
When some error occurs, the HttpJob, throws the error, but when I get the message using,
The Log, register the follow message: InternalServerError.
Is there any way of get the message that was throw by the exception class of my REST sercive?
If I use SoapUI to test the service, I can see that occurs an InternalServerError, but the message was there, in the response.
Regards.
I'm getting some difficulty with get the error message when I got an InternalServerError, from my REST service that is in the environment of my application.
My REST Service is using Jersey library (JAVA), and InternalServerErrors generated by an the code, following the best practices.
B4X:
public class CustomInteralErrorServerException extends WebApplicationException {
private static final long serialVersionUID = -8122413512746549653L;
public CustomInteralErrorServerException() {
super(Response.noContent().build());
}
public CustomInteralErrorServerException(String message) {
super(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message).header("Content-Type", "text/plain;charset=UTF-8").build());
}
}
When some error occurs, the HttpJob, throws the error, but when I get the message using,
B4X:
If Job.Success Then
Log(Job.GetString)
Select Job.JobName
Case "AcceptOrder"
AcceptOrder_Success
Else
Log(Job.ErrorMessage)
Select Job.JobName
Case "AcceptOrder"
AcceptOrder_Fail
End Select
End If
Job.Release
End If
The Log, register the follow message: InternalServerError.
Is there any way of get the message that was throw by the exception class of my REST sercive?
If I use SoapUI to test the service, I can see that occurs an InternalServerError, but the message was there, in the response.
Regards.