Skip to content

Contact tests - #615

Open
davidabram wants to merge 18 commits into
mainfrom
feat/contact-tests
Open

Contact tests#615
davidabram wants to merge 18 commits into
mainfrom
feat/contact-tests

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercelBot commented Sep 16, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentPreviewCommentsUpdated (UTC)
web-contactReadyReadyPreviewCommentOct 8, 2025 0:23am
1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
company-websiteSkippedSkippedOct 8, 2025 0:23am

Comment threadapps/contact/helpers/notion.ts Fixed
Comment threadapps/contact/app/api/contact/route.tsx Fixed
Comment threadapps/contact/app/api/contact/route.tsx Outdated
await notifyContactCreated(name, email, url);
} else if (errorMessage) {
await notifyContactError(name, email, message);
throw {

Copy link
Copy Markdown
MemberAuthor

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";

Copy link
Copy Markdown
MemberAuthor

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?

Comment threadapps/contact/helpers/notion.ts Outdated
id: response.id,
url: response.url,
};
} else if (response.id && !isFullPage(response)) {

Copy link
Copy Markdown
MemberAuthor

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",

Copy link
Copy Markdown
MemberAuthor

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) {

Copy link
Copy Markdown
MemberAuthor

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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@davidabram@github-advanced-security@Ante-Koceic