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

Improve few ingress errors #2596

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/ingress-http/src/handler/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use std::string;
pub(crate) enum HandlerError {
#[error("not found")]
NotFound,
#[error("service '{0}' not found")]
#[error("service '{0}' not found, make sure to register the service before calling it.")]
ServiceNotFound(String),
#[error("service '{0}' handler '{1}' not found")]
#[error("the service '{0}' exists, but the handler '{1}' was not found, check that the handler exists in the latest registered service version.")]
ServiceHandlerNotFound(String, String),
#[error("invocation not found")]
InvocationNotFound,
Expand Down
2 changes: 1 addition & 1 deletion crates/ingress-http/src/handler/invocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ where
.await?
{
AttachInvocationResponse::NotFound => {
return Err(HandlerError::NotFound);
return Err(HandlerError::InvocationNotFound);
}
AttachInvocationResponse::NotSupported => {
return Err(HandlerError::NotImplemented);
Expand Down
2 changes: 1 addition & 1 deletion crates/ingress-http/src/handler/workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where
.await?
{
AttachInvocationResponse::NotFound => {
return Err(HandlerError::NotFound);
return Err(HandlerError::InvocationNotFound);
}
AttachInvocationResponse::NotSupported => {
return Err(HandlerError::NotImplemented);
Expand Down
4 changes: 2 additions & 2 deletions crates/types/src/schema/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,9 @@ fn error_response_json_schema() -> Value {
"type": "string",
"title": "Error message"
},
"description": {
"stacktrace": {
"type": "string",
"title": "Verbose error description"
"title": "Stacktrace of the error"
}
},
"required": ["message"],
Expand Down
Loading