Skip to content

Add CONFLICT and REQUEST_TIMEOUT handler error types #37

@mjameswh

Description

@mjameswh

Description

  • Handler error types CONFLICT and REQUEST_TIMEOUT have recently been added to the Nexus RPC spec. Those values must therefore be added to the Handler Error Type enum for this SDK.

Reference

Here are the key changes from the Go SDK.

	// The requested resource could not be found but may be available in the future. Clients should not retry this
	// request unless advised otherwise.
        HandlerErrorTypeNotFound HandlerErrorType = "NOT_FOUND"

+	// Returned by the server to when it has given up handling a request. The may occur by enforcing a client
+	// provided `Request-Timeout` or for any arbitrary reason such as enforcing some configurable limit. Subsequent
+	// requests by the client are permissible.
+	HandlerErrorTypeRequestTimeout HandlerErrorType = "REQUEST_TIMEOUT"
+
+	// The request could not be made due to a conflict. The may happen when trying to create an operation that
+	// has already been started. Clients should not retry this request unless advised otherwise.
+	HandlerErrorTypeConflict HandlerErrorType = "CONFLICT"

	// Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of
	// space. Subsequent requests by the client are permissible.
	HandlerErrorTypeResourceExhausted HandlerErrorType = "RESOURCE_EXHAUSTED"

If applicable to this language, the logic that is used to determine the default retry policy of a given error type must also be updated as follow:

  • REQUEST_TIMEOUT is retryable by default
  • CONFLICT is non-retryable by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions