From 507c8c6cd6714f4143aeb8b8cbb71dbc387368c6 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 6 Jun 2024 16:17:23 -0400 Subject: [PATCH] Add error reason for wildcards Reference: https://github.com/authzed/spicedb/issues/1925 --- authzed/api/v1/error_reason.proto | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/authzed/api/v1/error_reason.proto b/authzed/api/v1/error_reason.proto index 1cc54ce..2591130 100644 --- a/authzed/api/v1/error_reason.proto +++ b/authzed/api/v1/error_reason.proto @@ -386,4 +386,17 @@ enum ErrorReason { // "metadata": { "counter_name": "name" } // } ERROR_REASON_COUNTER_NOT_REGISTERED = 27; + + // The request failed because a wildcard was not allowed. For CheckPermission, + // this means that the subject or resource ID was a wildcard. For LookupResources, + // this means that the subject ID was a wildcard. + // + // Example of an ErrorInfo: + // + // { + // "reason": "ERROR_REASON_WILDCARD_NOT_ALLOWED", + // "domain": "authzed.com", + // "metadata": { "disallowed_field": "subject_id" } + // } + ERROR_REASON_WILDCARD_NOT_ALLOWED = 28; } \ No newline at end of file