authz: check project list endpoints#617
Conversation
| LookupType::Other("Listing All".to_string()), | ||
| ) | ||
| }) | ||
| .map_err(public_error_from_diesel_pool_shouldnt_fail) |
There was a problem hiding this comment.
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).
teisenbe
left a comment
There was a problem hiding this comment.
Looks good to me! It's nice seeing the progress on this
No description provided.