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

fix: Return HTTP 400 for missing ID in request #779

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

bstasyszyn
Copy link
Contributor

Return HTTP 400 (bad request) instead of 500 (internal server error) for a REST request that's missing the object ID.

closes #777

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

Return HTTP 400 (bad request) instead of 500 (internal server error) for a REST request that's missing the object ID.

closes trustbloc#777

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@cla-bot cla-bot bot added the cla-signed label Sep 17, 2021
@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #779 (6b50298) into main (47f8040) will increase coverage by 0.00%.
The diff coverage is 93.75%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #779   +/-   ##
=======================================
  Coverage   89.98%   89.98%           
=======================================
  Files         137      137           
  Lines       11582    11588    +6     
=======================================
+ Hits        10422    10428    +6     
  Misses        716      716           
  Partials      444      444           
Impacted Files Coverage Δ
pkg/activitypub/resthandler/resthandler.go 91.21% <0.00%> (ø)
pkg/activitypub/resthandler/activityhandler.go 93.69% <100.00%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47f8040...6b50298. Read the comment docs.

@bstasyszyn bstasyszyn merged commit 107e3f4 into trustbloc:main Sep 17, 2021
@bstasyszyn bstasyszyn deleted the 777 branch September 17, 2021 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return HTTP 400 when ID not specified in URL of activities request
3 participants