Skip to content

authz: check project list endpoints#617

Merged
davepacheco merged 1 commit into
mainfrom
authz-work
Jan 21, 2022
Merged

authz: check project list endpoints#617
davepacheco merged 1 commit into
mainfrom
authz-work

Conversation

@davepacheco

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread nexus/src/db/datastore.rs
LookupType::Other("Listing All".to_string()),
)
})
.map_err(public_error_from_diesel_pool_shouldnt_fail)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This change to the error-handling function is sort of unrelated but cleans things up a bit. When the previous code was written, the "shouldnt_fail" function did not exist. We used public_error_from_diesel_pool with parameters that would allow it to generate a 404 if something wasn't found. I don't believe this case was possible. There's no reason this query should ever produce a 404 error, or any other error resulting from bad input or a valid state of the database. That's what the "shouldnt_fail" variant is for -- it produces either a 503 (if there was a problem making the query, either at the network or database level) or a 500 (if any other problem was found -- this would reflect some kind of bug in Nexus).

@davepacheco davepacheco mentioned this pull request Jan 21, 2022
71 tasks

@teisenbe teisenbe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! It's nice seeing the progress on this

@davepacheco davepacheco merged commit e603db7 into main Jan 21, 2022
@davepacheco davepacheco deleted the authz-work branch January 21, 2022 23:33
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