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

Exposing more details in 500-level Errors #5692

Open
jgallagher opened this issue May 3, 2024 · 0 comments
Open

Exposing more details in 500-level Errors #5692

jgallagher opened this issue May 3, 2024 · 0 comments

Comments

@jgallagher
Copy link
Contributor

From within a dropshot endpoint, we can craft a 500-level error that includes a message that's sent to the client; e.g.,

let message =
format!("Failed to send rack setup request: {err}");
HttpError {
status_code: http::StatusCode::SERVICE_UNAVAILABLE,
error_code: None,
external_message: message.clone(),
internal_message: message,
}
.

However, I don't think we can do the same with the omicron Error type; we have Error::InternalError { .. } and Error::ServiceUnavailable { .. }, but those only provide the internal message, which leaves the client with a generic external message. I imagine this is something we wouldn't use a lot (?), but it came up on #5686 (comment) where it would have been nice to give the operator more information about what they should do to recover.

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

No branches or pull requests

1 participant