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

Inconsistent behaviour on duplicate POST /schema and POST /credential-definitions #679

Closed
jcourt562 opened this issue Aug 21, 2020 · 5 comments

Comments

@jcourt562
Copy link
Contributor

Version: 0.5.3

Expected Result: Either POST /schema should return 422 on duplicates OR POST /credential-definitions should return 200 on duplicates.

Description : When creating a duplicate schema with the same schema_version and schema_name and DID it returns a 200 result, presumably treating this as success because the resource already exists and no action is taken. However when creating a duplicate credential definition with the same schema_id and tag and DID a 422 error is returned. Duplicates of both types should be handled consistently.

@sklump
Copy link
Contributor

sklump commented Aug 21, 2020

I will look into this, but they may not come out to be the same thing. Credential definitions require private keys; schemas do not. Getting 422 seems wrong though.

@sklump
Copy link
Contributor

sklump commented Aug 21, 2020

I can't reproduce the 422. I have streamlined the non-secret record creation logic to parallel that of send-schema: #683.

If you still encounter this, I need details of what you're sending.

@jcourt562
Copy link
Contributor Author

I will run again with updated code and get you the request response output for duplicate credentials if the issue still exists.
Thanks

@sklump
Copy link
Contributor

sklump commented Aug 21, 2020

To be clear: I need the request JSON for every request to get you to this point, and the corresponding responses, in order. Please and thanks.

@jcourt562
Copy link
Contributor Author

I ran through this again today with the latest from master and couldn't reproduce. Closing this as either I had some strange environment situation or the problem was resolved by the code re-org mentioned above.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants