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

fix(moncaco/validate): handle metadata being undefined #202

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

ewanharris
Copy link
Member

Description

It's possible for an error returned from the validateDSL method in language to return no metadata (1, 2), based on documentation/the source code from ANTRL this would indicate that the error arose from the lexer but unfortunately I've not been able to come up with a case where I can reproduce this to write a test from.

That said, based on the error shown in Sentry and the surrounding code this is a fairly certain fix for the issue.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@ewanharris ewanharris requested review from a team as code owners January 25, 2024 11:44
@ewanharris ewanharris force-pushed the fix/handle-undefined-metadata branch from 141543f to be3dfa3 Compare January 25, 2024 11:45
@ewanharris ewanharris enabled auto-merge January 25, 2024 14:07
@ewanharris ewanharris added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit 65ce009 Jan 25, 2024
18 checks passed
@ewanharris ewanharris deleted the fix/handle-undefined-metadata branch January 25, 2024 14:34
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.

2 participants