Summary
FgaApiAuthenticationError currently extends FgaError instead of FgaApiError.
Impact
Authentication failures are excluded from API-error polymorphism:
instanceof FgaApiError checks fail for authentication errors
- shared API error handling paths can miss auth failures
FgaApiAuthenticationError duplicates metadata fields instead of inheriting the common API error shape
Expected
FgaApiAuthenticationError should inherit from FgaApiError like other API-derived errors.
Proposed Fix
Change inheritance to:
export class FgaApiAuthenticationError extends FgaApiError
and keep auth-specific fields and message behavior.
Summary
FgaApiAuthenticationErrorcurrently extendsFgaErrorinstead ofFgaApiError.Impact
Authentication failures are excluded from API-error polymorphism:
instanceof FgaApiErrorchecks fail for authentication errorsFgaApiAuthenticationErrorduplicates metadata fields instead of inheriting the common API error shapeExpected
FgaApiAuthenticationErrorshould inherit fromFgaApiErrorlike other API-derived errors.Proposed Fix
Change inheritance to:
and keep auth-specific fields and message behavior.