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

Don't allow constructing a RouteId with invalid uuid #597

Closed
wants to merge 1 commit into from

Conversation

michaeldjeffrey
Copy link
Contributor

I'm not sure if this is the right way to go about this since the result is being thrown away and reparsed later.

A few days ago, a User was trying to list a routes Euis and being met with an unauthorized request signature error, when it was a route_id typo.

Making sure a user provides a valid Uuid as early as possible can provide better guidance towards using the system. Normally the route id is not attempted to be parsed until the db is about to be hit where other concerns are more pertinent. This leaves Uuid parsing errors mostly to be overwritten as general authentication errors.

Making sure a user provides a valid Uuid as early as possible can
provide better guidance towards using the system. Normally the route id
is not attempted to be parsed until the db is about to be hit where
other concerns are more pertinent. This leaves Uuid parsing errors
mostly to be overwritten as general authentication errors.
@jeffgrunewald
Copy link
Contributor

jeffgrunewald commented Aug 13, 2023

i think this is definitely a reasonable thing to expose to a user to improve their ability to do error handling but i'd lean more toward the alternative implementation i put up in #598 which just reuses the existing error instead of swallowing the details in the rpc handler's map_err().

this should effectively provide the same result to the caller. let me know what you think.

@jeffgrunewald
Copy link
Contributor

Closing in favor of #598

@michaeldjeffrey michaeldjeffrey deleted the mj/uuid-parse-early branch October 18, 2024 16: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