Fix HTTP responses for salmon and ActivityPub inbox processing (#5200)
* Return sensible HTTP status for ActivityPub inbox processing * Return sensible HTTP status for salmon slap processing * Return additional information to debug signature verification failures
This commit is contained in:
parent
e6543d5fc4
commit
dfaa219f88
4 changed files with 17 additions and 6 deletions
|
@ -7,9 +7,11 @@ class Api::SalmonController < Api::BaseController
|
|||
def update
|
||||
if verify_payload?
|
||||
process_salmon
|
||||
head 201
|
||||
else
|
||||
head 202
|
||||
elsif payload.present?
|
||||
[signature_verification_failure_reason, 401]
|
||||
else
|
||||
head 400
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue