-
Notifications
You must be signed in to change notification settings - Fork 1
Contact tests #615
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
base: main
Are you sure you want to change the base?
Contact tests #615
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
36a1895 to
2579818
Compare
| await notifyContactCreated(name, email, url); | ||
| } else if (errorMessage) { | ||
| await notifyContactError(name, email, message); | ||
| throw { |
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.
Why throw here?
|
|
||
| const statusCode = (error as any).statusCode || 501; | ||
| const message = | ||
| (error as any)?.body?.message || "Issue while processing request"; |
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 isn't a standard error. What is this?
apps/contact/helpers/notion.ts
Outdated
| id: response.id, | ||
| url: response.url, | ||
| }; | ||
| } else if (response.id && !isFullPage(response)) { |
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.
early return / flatten if else
| } | ||
| } catch (e) { | ||
| return { | ||
| error: "Failed to create notion page", |
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.
log
| source, | ||
| ); | ||
|
|
||
| if (notionPageId && url) { |
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.
Early return, figure out what's going on in notion helper.
3419fba to
6e1f259
Compare
No description provided.