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

Fix: Error handling #386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bilalmirza74
Copy link
Contributor

@bilalmirza74 bilalmirza74 commented Oct 22, 2024

What kind of change does this PR introduce?

error handling component by checking for missing integrations before accessing their properties

eg: Bug fix, feature, docs update, ...

Why was this change needed?

Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.

Other information:

eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?

Checklist:

Put a "X" in the boxes below to indicate you have followed the checklist;

  • I have read the CONTRIBUTING guide.
  • I checked that there were not similar issues or PRs already open for this.
  • This PR fixes just ONE issue (do not include multiple issues or types of change in the same PR) For example, don't try and fix a UI issue and include new dependencies in the same PR.

Copy link

vercel bot commented Oct 22, 2024

@bilalmirza74 is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

@bilalmirza74
Copy link
Contributor Author

@jamesread Take a look

.utc(post.publishDate)
.diff(dayjs.utc(post.publishDate).startOf('day'), 'minute'),
}));
const createdPosts = posts.map((post) => {
Copy link
Collaborator

@jamesread jamesread Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under what condition is post.integration null? I don't know if just just using the null operator on everything below is the right approach here, it feels like post.integration = null is an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes
post.integration could be null if there's missing or invalid integration data linked to posts.

Sign up for free to 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.

2 participants