Skip to content
Snippets Groups Projects
Commit c3b50e40 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Improving error messages from endpoint

parent 4c71fa1a
Branches
Tags
No related merge requests found
......@@ -295,7 +295,11 @@ public class ModelResourceImpl implements ModelResource{
Logger.getLogger(ModelResourceImpl.class.getName()).log(Level.SEVERE, null, ex);
if(ex instanceof ConfigValidationException){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST).entity(ex).build());
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST).entity(ex.getMessage()).build());
}
else if(ex instanceof NoSuchModelException)
{
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST).entity(ex.getMessage()).build());
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment