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

Provide more explicit errors with metadata in synchronizer #483

Open
f1ames opened this issue Aug 18, 2023 · 0 comments
Open

Provide more explicit errors with metadata in synchronizer #483

f1ames opened this issue Aug 18, 2023 · 0 comments
Labels

Comments

@f1ames
Copy link
Contributor

f1ames commented Aug 18, 2023

At this stage, when error occurs in synchronizer, it will be thrown (or rethrown) to consumer to catch it. There are places where we also throw our own (kind of) errors explicitly, for example:

throw new Error(
`The '${repoId}' repository does not belong to any project in Monokle Cloud. Configure it on ${projectUrl}.`
);

In such cases, we should provide custom error codes and additional metadata if possible (e.g. user id, project id/name, related Monokle Cloud URL, etc). This will be very convenient for package consumers to be able to differentiate errors correctly and provide detail information (and possible actions/fixes) for such errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant