Skip to content

feat(admin): surface API errors in admin store actions #3850

Description

@PierreBrisorgueil

Problem

All admin store actions (getUsers, getOrganizations, getCosts, etc.) swallow errors with console.log(err) and no user feedback. When an admin API call fails (network error, 403, 500), the view silently shows empty data with no indication of failure.

Proposed fix

Add an error state to the admin store and set it in each catch block. Surface it in admin.view.vue with a v-alert or snackbar.

// store
state: { ..., error: null },
// in each catch:
this.error = err?.response?.data?.message || 'Failed to load data';

Downstream

This pattern is used in all downstream admin views (trawl, comes, montaine, pierreb). Fix in the stack flows down via /update-stack.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions