-
Notifications
You must be signed in to change notification settings - Fork 7
Attestation service responses and exceptions #48
Attestation service responses and exceptions #48
Conversation
One inconsistency with develop (which probably should be resolved before this PR is merged) is that #29 was implemented with exceptions having an string rather than dictionary value, so handle_request now returns two error responses:
A dapp developer calling the attestation service endpoints will get a different error response format returned depending on whether they made the error-causing request with bad params, or the request hit an exception. I wasn't sure if the [code/path/message] format that was originally implemented was meant for filtering on, and if it's ok to use string error messages (the errors could also be filtered based on class type). If so, returning the errors as strings would change a request that fails Marshmallow validation from
to something like
Feedback appreciated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ambertch Looks great!
I think this simpler error format is better. We can merge this as-is - the other repos are not dependent on the current structure of error responses.
One request: can you update the README to reflect the new error response format?
…ound) during signature generation
api/README has been updated |
@ambertch Looking good! I can approve once the conflicts have been resolved. |
@@ -40,6 +40,13 @@ | |||
|
|||
CODE_EXPIRATION_TIME_MINUTES = 30 | |||
|
|||
CLAIM_TYPES = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice ⚡️
Thanks for all the work here - it's looking good. Tomorrow I'm going to resolve the conflicts in this PR and then make sure everything works with the rest of the stack - origin-js and demo-dapp. That's a to-do for me. Sorry for the delay on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ambertch Just merged in the develop branch. Looks good to me!
Checklist:
Description:
Please explain the changes you made here:
Implements #29, #33, #42, #40:
In addition,