-
Notifications
You must be signed in to change notification settings - Fork 47
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
Should returning ProblemDetail
objects be mandatory?
#414
Comments
The group discussed this on 2024-08-20: @PatStLouis noted that the VCDM, DI, BSL all have normative examples of Can verification response be more dynamic and return more information? @dlongley noted that it would be good to have client request specific type of error or warning response, that would allow people to layer changes on top (additional feature to include @PatStLouis noted that for @PatStLouis asked about the "option" to return "ProblemDetails". @dlongley noted that an input parameter might be needed to figure out what you want checked "check all status", or "check status of this type and purpose (e.g., revocation)" (how "strict" you want the verification to be). "As soon as you get an error, return HTTP 400 and exit immediately" or "Go as far as you can and return all errors". Do we need "strict mode" or "detail. |
The group discussed this on 2024-09-03: @PatStLouis noted that an option to get "verbose details" back as "ProblemDetails" is useful to understand what happened when a verification was performed; the option could be used to assert details on the verification process. With respect to @mburchil noted that implementations are leaving up to requester/wallet to provide at request time, wallets note whether they care whether or not something is suspended/revoked, and then true/false comes back in information provided by them. Don't provide information beyond true/false, relied on requester to state current status. In verification request, they state whether or not they care. @PatStLouis noted that endpoint will do the check, in light of different test suites... verify will return information, but not take action on it. Verify not meant to be called by wallet, component of software and it should inform software of verification information so software can take decisions based on information found. Verifier would return property that can be acted upon by coordinator. Coordinator might not care if a credential has been revoked. @mburchil noted that Entra is doing it the other way, field for "verification" whether or not you care if something is revoked or not. @PatStLouis noted that when someone provides endpoint, customized parameters if implementation checks status -- this question is about ProblemDetails. ... long discussion on what to do ensued ... The group came to the following conclusions:
Return object should have:
|
Where I had some confusion which lead me to not know about how to use the problem details was that the endpoints https://w3c-ccg.github.io/vc-api/#verify-credential and https://w3c-ccg.github.io/vc-api/#verify-presentation both return an Although it mentions https://w3c-ccg.github.io/vc-api/#verification-response that ProblemDetails should be raised, I assumed this was for libraries rather than API calls. Though problem details was intended for API responses. The RFC https://www.rfc-editor.org/rfc/rfc9457 seems to intend to return a single type of error, though there is an option to return multiple errors they are of a single type. In verification we perform distinct checks that return potentially different types of errors so, its hard to use as per rfc9457. Error codes as a number are limiting, having known errors which can be easily identified is helpful, preferably it would be a namespaced maybe with a delimeted string to prevent or at least reduce clashes. |
@robdefeo thank you for this valuable feedback as an implementer reading the specification. The errors/warnings array where the legacy response objects prior to the introduction of problem details in vcdm 2.0. #418 is looking to clarify the response objects and update according to the specification. Please note that these are designed to be optional and enabled through configuration, such as an option Please let us know how we can improve documentation around this and make it as seamless as possible to implement. |
This clarification is helpful, what I think readers will benefit from is the spec text being updated inline with the change to the yml, see
These sections make no mention of problem details in the response, in fact it explicitly states The reference PR updates the openAPI but I couldn't see if update the index.html, but that seems to be happening via some imports of the spec so it may well be solved, but its hard for me to tell. |
@robdefeo Thank you for pointing this out and yes you are correct, we very much want the spec text to be updated to reflect this. There seems to be some problem with linting I will have a look. |
The VCDM, DI, BSL all have normative examples of
ProblemDetail
objects in their error handling sections. The verification algorithms have normative statements about exposing errors as well. The VC API doesn't specify how these objects are exposed to callers. Should the API do this?The text was updated successfully, but these errors were encountered: