mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 17:21:00 +00:00
Adjusted exception messages.
This commit is contained in:
1 parent
6f66fc6efb
commit
ab6be35a29
2 files changed
+1
-6
No files matched your search
-2
@@ -135,8 +135,6 @@ public class EventsResource extends AbstractSailingServerResource {
|
||||
return ok(regatta.getId().toString(), MediaType.TEXT_PLAIN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/addCourseArea")
|
||||
@Consumes("text/plain")
|
||||
|
||||
+1
-4
@@ -13,10 +13,7 @@ import org.apache.commons.lang.StringEscapeUtils;
|
||||
@Provider
|
||||
public class ExceptionManager implements ExceptionMapper<Exception>{
|
||||
public Response toResponse(Exception exception) {
|
||||
if(exception instanceof IllegalArgumentException){
|
||||
return Response.status(400).entity("IllegalArgumentException: "+exception.getMessage()).type("text/plain").build();
|
||||
}
|
||||
return Response.status(300).entity("Internal Server Error").type("text/plain").build();
|
||||
return Response.status(400).entity(exception.getMessage()).type("text/plain").build();
|
||||
}
|
||||
|
||||
public static String invalidDateFormatMsg(String date) {
|
||||
|
||||
Reference in new issue
Block a user