From b3e295b47679a4efa8ae5da47325d0a2c72f254c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rold=C3=A1n=20Betancort?= Date: Mon, 2 Oct 2023 09:41:36 +0100 Subject: [PATCH] add serialization error to support https://github.com/authzed/spicedb/pull/1552 --- authzed/api/v1/error_reason.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/authzed/api/v1/error_reason.proto b/authzed/api/v1/error_reason.proto index fb9d3e8..bbeedf9 100644 --- a/authzed/api/v1/error_reason.proto +++ b/authzed/api/v1/error_reason.proto @@ -285,4 +285,18 @@ enum ErrorReason { // } // } ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED = 19; + + // The request failed due to a serialization error in the backend database. + // This typically indicates that various in flight transactions conflicted with each other + // and the database had to abort one or more of them. SpiceDB will retry a few times before returning + // the error to the client. + // + // Example of an ErrorInfo: + // + // { + // "reason": "ERROR_REASON_SERIALIZATION_FAILURE", + // "domain": "authzed.com", + // "metadata": {} + // } + ERROR_REASON_SERIALIZATION_FAILURE = 20; } \ No newline at end of file