Skip to content

Add error-state handling and retry UX for API failures #21

Description

@Dannyswiss1

client/src/lib/api.ts never fails today, so every page assumes the happy path. Add a way for mock calls to
simulate failure (useful for tests and future real-backend integration), and add error UI to each page: a
"Something went wrong" state with a retry button, plus error toasts for failed mutations (upload, revoke, staff
add, access request).

Acceptance criteria

  • Each data-fetching page has a distinct error state, not just infinite/silent loading
  • Failed mutations show an error toast (reuse the existing useToast error kind)
  • A retry action re-triggers the failed fetch without a full page reload

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions