Skip to content

create a reusable error handling utilities #1198

@tomsmith8

Description

@tomsmith8

Task

no error utilities in /src/lib

We should create a reusable error handling utility?
Something like:

// src/lib/api/errors.ts
export const API_ERRORS = {
UNAUTHORIZED: { message: "Unauthorized", status: 401 },
WORKSPACE_NOT_FOUND: { message: "Workspace not found or access denied", status: 403 },
// ...
}

export function handleApiError(error: unknown) {
// Centralized error handling logic
}

This would make error handling more consistent and maintainable for all endpoints

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