Skip to content

Conversation

@erdemonal11
Copy link

Fixes #212

This pull request updates the OpenAPI specification to provide a consistent error response structure, as discussed in the issue.

It adds a content block referencing RFC9457ProblemDetails to all 4xx and 5xx error responses.

@peacekeeper
Copy link
Collaborator

@erdemonal11 I know I agreed with your idea in my comment #212 (comment), but now after reviewing the PR, I am wondering if this change is really the right thing to do.

My interpretation of the current spec text is that in case of an error, a resolver would still return a full ResolutionResult (which can contain a RFC9457ProblemDetails), rather than returning only the RFC9457ProblemDetails.

But maybe we should discuss this in the WG.

In other words, I think the question is whether the error response content should look like this:

{
    "didDocument": null,
    "didResolutionMetadata": {
        "error": {
            "type": "NOT_FOUND",
            "title": "The DID or DID document was not found.",
            "detail": "No resolve result for did:method:BDrEcHc8Tb4Lb2VyQZWEDE"
        }
    },
    "didDocumentMetadata": {}
}

Or like this:

{
    "type": "NOT_FOUND",
    "title": "The DID or DID document was not found.",
    "detail": "No resolve result for did:method:BDrEcHc8Tb4Lb2VyQZWEDE"
}

@peacekeeper
Copy link
Collaborator

@erdemonal11 We discussed this in the DID WG meeting yesterday:
https://www.w3.org/2025/10/16-did-minutes.html#d627

In this meeting, we thought that it's better to leave things as-is. In other words, in case of an error, we include the RFC9457ProblemDetails as part of the DID resolution metadata, rather than returning only the RFC9457ProblemDetails itself.

Would this be fine with you, or do you see any problems with this?

@erdemonal11
Copy link
Author

@peacekeeper It is fine for me I checked and I don't see any problems.

@peacekeeper
Copy link
Collaborator

@peacekeeper It is fine for me I checked and I don't see any problems.

Thank you, in this case should we close this PR here?

Alternatively you could update the PR so the 4xx and 5xx responses reference ResolutionResult or DereferencingResult, instead of RFC9457ProblemDetails.

@erdemonal11
Copy link
Author

@peacekeeper The error responses now reference ResolutionResult and DereferencingResult as decided, so the technical changes should be complete.

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

Successfully merging this pull request may close these issues.

Standardize error responses with RFC9457ProblemDetails

2 participants