Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ui): refactor sveltekit api endpoints to follow better error handling pattern #1056

Open
andrewrisse opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
tech-debt Not a feature, but still necessary

Comments

@andrewrisse
Copy link
Contributor

Check all SvelteKit API endpoint to ensure they follow a similar pattern for error handling (both validation, and catch all errors).

Follow the pattern in api/audio/translation/+server.ts

Blocked by #1046

ex. validation:

catch (e) {
    console.error(e);
    error(400, { message: `${e}` });
  }
catch (e) {
  return handleError(e);
}

This will allow frontend components to handle validation vs other errors

@andrewrisse andrewrisse added the tech-debt Not a feature, but still necessary label Sep 18, 2024
@andrewrisse andrewrisse self-assigned this Sep 18, 2024
@andrewrisse andrewrisse mentioned this issue Sep 18, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Not a feature, but still necessary
Projects
None yet
Development

No branches or pull requests

1 participant