Skip to content

Commit

Permalink
Rename some status codes (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier authored Aug 8, 2023
1 parent 4c91d30 commit a15d213
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion IceRpc/Internal/IceRpcDefinitions.slice
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ compact struct IceRpcRequestHeader {
[cs::readonly]
compact struct IceRpcResponseHeader {
statusCode: StatusCode
// errorMessage: string // only present when StatusCode > Success
// errorMessage: string // only present when StatusCode > Ok
// fields: dictionary<ResponseFieldKey, sequence<uint8>> (encoded/decoded manually)
}

Expand Down
22 changes: 11 additions & 11 deletions IceRpc/StatusCode.slice
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ module IceRpc
/// occurred. It's carried by responses.
unchecked enum StatusCode : varuint62 {
/// The dispatch completed successfully.
Success = 0
Ok = 0

/// The dispatch failed with an application-specific error.
ApplicationError

/// The dispatch could not find the target service.
ServiceNotFound
/// The dispatch could not find the target service or some other resource.
NotFound

/// The dispatch found the target service but this target service does not have the requested operation.
OperationNotFound
/// The target service was found but it does not implement the requested operation.
NotImplemented

/// The target service is currently unavailable and the caller can safely retry.
/// The server or the target service is currently unavailable and the caller can safely retry.
Unavailable

/// The dispatch failed with an unhandled exception.
UnhandledException
/// The dispatch failed due to an internal service or server error. This is typically caused by a bug in the server
/// or in the target service.
InternalError

/// The dispatch failed because the request payload could not be decoded or because a middleware could not decode
/// a request field. It is typically due to a mismatch of the Slice definitions (or more generally IDL definitions)
/// used by the invoker and the dispatcher.
/// a request field. It is typically due to a mismatch in the IDL definitions used by the client and the server.
InvalidData

/// The dispatch failed because it received a truncated payload. This is usually caused by a failure of the invoker
/// while it was sending the payload.
TruncatedPayload

/// The dispatch detected the expiration of the request's deadline.
DeadlineExpired
DeadlineExceeded

/// The caller is not authorized to access the requested resource.
Unauthorized
Expand Down

0 comments on commit a15d213

Please sign in to comment.