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

Schema validation in the issuer node is not providing clear error messages #667

Open
roderik opened this issue Jun 12, 2024 · 5 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@roderik
Copy link
Contributor

roderik commented Jun 12, 2024

Expected behaviour

Credential is issued

Actual behaviour

time=2024-06-12T14:09:32.439Z level=ERROR msg="validating credential subject" err="protected term redefinition: invalid JSON-LD syntax; tried to redefine a protected term"
time=2024-06-12T14:09:32.439Z level=ERROR msg="error saving the link" err="cannot parse claim"

Steps to reproduce the problem

I created the following credential via the public credential designer: https://schema-builder.polygonid.me/schemas/bbf8da01-b417-4349-84bb-eec622dc1d57

I can import it into the issuer (public and self managed), but when i try to issue it I get the error above (error 400 in the browser)

System information

Issuer node version: 0xpolygon/issuernode:7e0c661
OS & Version: k8s amd64
Browser & Version: Chrome/Safari

Logs (if needed)

time=2024-06-12T14:09:32.439Z level=ERROR msg="validating credential subject" err="protected term redefinition: invalid JSON-LD syntax; tried to redefine a protected term"
time=2024-06-12T14:09:32.439Z level=ERROR msg="error saving the link" err="cannot parse claim"

When submitting logs, please submit them as text and not as screenshots.

@roderik
Copy link
Contributor Author

roderik commented Jun 12, 2024

Ok, so it is not possible to call a field "issuer". It would be best to prevent this in the UI.

@ottomorac ottomorac changed the title Failure to issue a credential made with the public credential builder Schema validation in the issuer node is not providing clear error messages Jun 12, 2024
@ottomorac
Copy link
Member

ottomorac commented Jun 12, 2024

I see yes. This error would apply to both the issuer node and the schema builder I agree. We need better error messages.

@ottomorac ottomorac added the enhancement New feature or request label Jun 12, 2024
@amonsosanz
Copy link
Contributor

Thx for the report @roderik. I see 2 issues here:

  1. The issuer node should not allow importing invalid schemas
  2. The schema builder should not allow building invalid schemas

We will review the list of reserved words, make sure they are consistent in both tools, and consider them when importing a schema in the issuer node.

@amonsosanz amonsosanz added bug Something isn't working and removed enhancement New feature or request labels Oct 28, 2024
@amonsosanz
Copy link
Contributor

We just fixed this in the Schema Builder. We added some other missing reserved words along with issuer.
image

Regarding the import of invalid schemas in the issuer node, we created an internal task that will be prioritized and eventually implemented. I suggest that we leave this issue open until this is fixed and released.

@ottomorac
Copy link
Member

Thank you @amonsosanz for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants