Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api does not return 400 error when q parameter value cannot be parsed #260

Closed
tloubrieu-jpl opened this issue Feb 24, 2023 · 1 comment Β· Fixed by #266
Closed

api does not return 400 error when q parameter value cannot be parsed #260

tloubrieu-jpl opened this issue Feb 24, 2023 · 1 comment Β· Fixed by #266
Assignees
Labels
B13.1 bug Something isn't working s.medium Medium level severity

Comments

@tloubrieu-jpl
Copy link
Member

Checked for duplicates

Yes - I've already checked

πŸ› Describe the bug

When I do request:

curl --request GET 'http://localhost:8081//classes/collections?q=""'

I get a 500 error.

πŸ•΅οΈ Expected behavior

I expected a 400 error with an explicit message saying the query string q is invalid and cannot be parsed.

πŸ“œ To Reproduce

See integration tests in repository 'registry'

πŸ–₯ Environment Info

No response

πŸ“š Version of Software Used

1.2.0-SNAPSHOT

🩺 Test Data / Additional context

No response

πŸ¦„ Related requirements

πŸ¦„ #xyz

βš™οΈ Engineering Details

I suugest to work on this ticket together with:
#252
#241 (mostly duplicate)

This requires to reintroduce invalid{Parameter}Exception

They will be catched and throw an InvalidRequestException in the processs transmutter method.

I suggest to create a super class of exception PDSAPIException to handle all the known exceptions. This will avoid to repeat all the thrown exception in the ranmute/rhandler/efLogic... methods, e.g.

throws ApplicationTypeException, IOException, LidVidNotFoundException, MembershipException,

There was also some discussion started on that in ticket #252

I think that would be useful to have a super type of exception,

@al-niessner
Copy link
Contributor

@tloubrieu-jpl Can you post the log file exception information related to this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B13.1 bug Something isn't working s.medium Medium level severity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants