Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
9f2292ea
Commit
9f2292ea
authored
5 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
when type of the argument is wrong return 400
parent
1ea69afe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!859
Resolve "deprecacy information for data overlay"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rest-api/src/main/java/lcsb/mapviewer/api/BaseController.java
+3
-1
3 additions, 1 deletion
...-api/src/main/java/lcsb/mapviewer/api/BaseController.java
with
3 additions
and
1 deletion
rest-api/src/main/java/lcsb/mapviewer/api/BaseController.java
+
3
−
1
View file @
9f2292ea
...
...
@@ -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
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment