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

catch queries that cause TypeError in [dynamicjson] #10556

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

chris48s
Copy link
Member

After we merged #10551 yesterday a new error popped up in Sentry https://shields.sentry.io/issues/5906771741?project=251614

Here's an example of a document and query that cause this

https://raw.githubusercontent.com/json-ld/json-ld.org/refs/heads/main/schemas/jsonld-schema.json

$.definitions.common.properties.['@id'].format

This particular document/query combination is an example of JSONPath-Plus/JSONPath#166 but I suspect there is a wider range of cases where we can hit this
https://github.com/JSONPath-Plus/JSONPath/blob/0c8dbcf656523fadc738cacee254ee8b96894bd7/src/jsonpath.js#L527-L528

In any case, we should catch this error and return an error badge, rather than falling over with an unhandled exception.

@chris48s chris48s added bug Bugs in badges and the frontend service-badge New or updated service badge labels Sep 26, 2024
@chris48s chris48s changed the title catch queries that cause TypeError catch queries that cause TypeError in [dynamicjson] Sep 26, 2024
Copy link
Contributor

Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against 5c52be7

@chris48s chris48s added this pull request to the merge queue Sep 30, 2024
Merged via the queue into badges:master with commit da60020 Sep 30, 2024
26 checks passed
@chris48s chris48s deleted the sentry-5906771741 branch September 30, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants