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

Gracefully fail if the spec is not a map #327

Merged
merged 2 commits into from Feb 5, 2024

Conversation

julienduchesne
Copy link
Member

@julienduchesne julienduchesne commented Feb 2, 2024

Based on #325 (I needed the ExpectedLogsContain util)

Closes #208

Currently, it panics when the Resource struct tries to interact with the spec as if it were a map. We should make sure that the spec actually is a map when we're casting as a Resource

@julienduchesne julienduchesne requested a review from a team as a code owner February 2, 2024 17:02
@julienduchesne julienduchesne changed the base branch from main to julienduchesne/test-diff-auth February 2, 2024 18:55
@julienduchesne julienduchesne changed the title Support JSON string in spec Gracefully fail if the spec is not a map Feb 2, 2024
Base automatically changed from julienduchesne/test-diff-auth to main February 5, 2024 16:12
Closes #208
The issue mentions that we should fail gracefully, but actually accepting a JSON spec seems like a good option to me
@julienduchesne julienduchesne merged commit 89fc946 into main Feb 5, 2024
7 checks passed
@julienduchesne julienduchesne deleted the julienduchesne/support-spec-json branch February 5, 2024 16:18
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.

Handle panic gracefully when passing JSON as string in the spec
2 participants