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

ux: return better error message if a segment doesn't exist #4122

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Jun 30, 2023

Catch cases where the segment doesn't exist and populate that error message with more info: it now says that a segment
with doesn't exist instead of just 'No row'.

This change adds error handling to the segment store in cases where
the ID isn't a valid postgres integer. This causes it to return a
BadDataError instead of throwing an uncaught Error.

As a bonus, we also catch cases where the row doesn't exist and
populate that error message with more info: it now says that a segment
with <id> doesn't exist instead of just 'No row'.
@vercel
Copy link

vercel bot commented Jun 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 8:55am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 8:55am

@thomasheartman thomasheartman changed the title Fix: return 400/404 errors if segment id is invalid or doesn't exist ux: return better error message if a segment doesn't exist Jun 30, 2023
@thomasheartman thomasheartman enabled auto-merge (squash) June 30, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants