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

Add database updates to APIs #302

Merged
merged 7 commits into from
Aug 23, 2023
Merged

Add database updates to APIs #302

merged 7 commits into from
Aug 23, 2023

Conversation

jfreda
Copy link
Contributor

@jfreda jfreda commented Aug 22, 2023

This PR adds functionality to current APIs to make database updates in addition to Algolia updates, as we migrate to the database being the source of truth for this information. Database errors for these APIs won't return HTTP errors and instead just log them because this data (in the DB) isn't critical yet.

@jfreda jfreda requested a review from a team as a code owner August 22, 2023 16:22
"path", r.URL.Path,
"doc_id", docID,
)
// Don't return an HTTP error because the database isn't the source of
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can mark this as a TODO just so we can track it when we introduce the new API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking that this would never change in this file - the new version of the API will be a different file and this file will just be deleted. I'll remember to return an HTTP error for v2 🙂

"path", r.URL.Path,
"doc_id", docID,
)
// Don't return an HTTP error because the database isn't the
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above.

@jfreda jfreda merged commit 4ba84ab into main Aug 23, 2023
2 checks passed
@jfreda jfreda deleted the jfreda/add-db-updates-to-apis branch August 23, 2023 18:34
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.

None yet

2 participants