-
Notifications
You must be signed in to change notification settings - Fork 3
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
Tp 2495 add logging to sol extension #263
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
console.error('Zod parsing error', result.error.issues) | ||
log( | ||
{ | ||
message: `${basicMessage}: zod parsing error`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error deserves some special attention because it means either Awell or SOL violated the API contract. I.e. the payload we received doesn't match the payload we agreed upon.
So I'd maybe not label it as a Zod error but call it something else and give it a more explicit name (maybe it's own error class?)
Example:
class SolApiResponseError extends Error {
public issues
constructor(message: string, issues: any[]) {
super(message);
this.name = 'SolApiResponseError';
this.issues = issues;
}
}
(same comment for the other fetch functions)
No description provided.