Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/server/auth/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ export class InsufficientScopeError extends OAuthError {
static errorCode = 'insufficient_scope';
}

/**
* Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
* (Custom error for resource indicators - RFC 8707)
*/
export class InvalidTargetError extends OAuthError {
static errorCode = 'invalid_target';
}

/**
* A utility class for defining one-off error codes
*/
Expand Down Expand Up @@ -199,5 +207,6 @@ export const OAUTH_ERRORS = {
[MethodNotAllowedError.errorCode]: MethodNotAllowedError,
[TooManyRequestsError.errorCode]: TooManyRequestsError,
[InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,
[InsufficientScopeError.errorCode]: InsufficientScopeError
[InsufficientScopeError.errorCode]: InsufficientScopeError,
[InvalidTargetError.errorCode]: InvalidTargetError
} as const;
Loading