Skip to content

fix: FgaApiAuthenticationError should extend FgaApiError #326

Description

@aaguiarz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions