diff --git a/server.go b/server.go index 506e0e4..e9a46f5 100644 --- a/server.go +++ b/server.go @@ -49,6 +49,14 @@ const ( ShutdownFlagIdle = ShutdownFlag(3) ) +type ErrorWithStatus struct { + StatusCode int +} + +func (e ErrorWithStatus) Error() string { + return fmt.Sprintf("%d", e.StatusCode) +} + type RpcReturnTypeInterface interface { Value() any Error() error