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 naive iteration of service listing #128

Conversation

savetheclocktower
Copy link
Contributor

My original stab at this in #125 wasn't paranoid enough. After all, we're reading from a random package.json file, and there's no guarantee that the format of that file will be what we expect.

In this case, the atom-ide-deno package detail page was 500ing because of this apparent nesting error in the JSON.

The fix is to do poor-man's validation of the JSON as we're consuming it, bailing if anything isn't what we expect.

Verification

https://web.pulsar-edit.dev/packages/atom-ide-deno will fail on main; http://localhost:8091/packages/atom-ide-deno will succeed when run locally on this PR branch.

Copy link
Member

@confused-Techie confused-Techie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Love the paranoia baked into this PR.

I'll go ahead and merge it when I've got time to push it's changes to prod, thanks for discovery and resolving the issue!

@confused-Techie confused-Techie merged commit 2775170 into pulsar-edit:main Jan 7, 2024
2 checks passed
@savetheclocktower savetheclocktower deleted the fix-service-listing-error branch January 7, 2024 23:07
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