nexusrpc.OperationError
An error that represents "failed" and "canceled" operation results.
Example
import nexusrpc raise nexusrpc.OperationError( "Processing failed due to invalid data", state=nexusrpc.OperationErrorState.FAILED ) raise nexusrpc.OperationError( "Operation was canceled by user request", state=nexusrpc.OperationErrorState.CANCELED )
| Method | __init__ |
Initialize a new OperationError. |
| Instance Variable | message |
Undocumented |
| Instance Variable | original |
Undocumented |
| Instance Variable | stack |
Undocumented |
| Instance Variable | state |
Undocumented |
Initialize a new OperationError.
| Parameters | |
message:str | A descriptive message for the error. |
state:OperationErrorState | The state of the operation (OperationErrorState). |
stackstr | None | An optional stack trace string. |
originalFailure | None | Set if this error is constructed from a failure object. |