Skip to content

Commit 07ea15e

Browse files
fix: 🚑️ improve error messages for forbidden includes to clarify not found status
1 parent 9610878 commit 07ea15e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎JsonApiToolkit/Attributes/AllowedIncludesAttribute.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ ActionExecutingContext context
122122

123123
var errorDetail =
124124
forbiddenIncludes.Count == 1
125-
? $"The requested include '{forbiddenIncludes[0]}' is not allowed for this endpoint"
126-
: $"The requested includes '{string.Join(", ", forbiddenIncludes)}' are not allowed for this endpoint";
125+
? $"The requested include '{forbiddenIncludes[0]}' was not found"
126+
: $"The requested includes '{string.Join(", ", forbiddenIncludes)}' were not found";
127127

128128
var error = new JsonApiError
129129
{

0 commit comments

Comments
 (0)