Skip to content
Snippets Groups Projects
Commit 9f2292ea authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when type of the argument is wrong return 400

parent 1ea69afe
No related branches found
No related tags found
1 merge request!859Resolve "deprecacy information for data overlay"
......@@ -14,6 +14,7 @@ import org.springframework.web.HttpMediaTypeNotSupportedException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
......@@ -41,7 +42,8 @@ public abstract class BaseController {
} else if (e instanceof QueryException
|| e instanceof HttpMessageNotReadableException
|| e instanceof MissingServletRequestParameterException
|| e instanceof HttpMediaTypeNotSupportedException) {
|| e instanceof HttpMediaTypeNotSupportedException
|| e instanceof MethodArgumentTypeMismatchException) {
logger.error(e, e);
return createErrorResponse("Query server error.", e.getMessage(), new HttpHeaders(), HttpStatus.BAD_REQUEST);
} else if (e instanceof ServletRequestBindingException && e.getMessage().contains(Configuration.AUTH_TOKEN)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment