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

Handle unexpected successful api response #2827

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

nelsonkopliku
Copy link
Member

Description

Recent changes to the shape of the activity log api response broke the frontend.
This PR makes the client more reliable on unexpected successful response shapes from the api.

How was this tested?

Automated tests

@nelsonkopliku nelsonkopliku requested a review from EMaksy July 26, 2024 12:32
@nelsonkopliku nelsonkopliku self-assigned this Jul 26, 2024
@nelsonkopliku nelsonkopliku added the enhancement New feature or request label Jul 26, 2024
@nelsonkopliku nelsonkopliku requested a review from balanza July 26, 2024 12:34
@nelsonkopliku nelsonkopliku changed the title Make fronted more resilient on unexpected successful api response Handle unexpected successful api response Jul 26, 2024
@nelsonkopliku nelsonkopliku added javascript Pull requests that update Javascript code env Create an ephimeral environment for the pr branch labels Jul 26, 2024
Copy link
Member

@EMaksy EMaksy left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -14,7 +14,7 @@ function ActivityLogPage() {
useEffect(() => {
getActivityLog()
.then((response) => {
setActivityLog(response.data);
setActivityLog(response.data?.data ?? []);
Copy link
Member

Choose a reason for hiding this comment

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

Nullish coalescing operator, nice!

@nelsonkopliku nelsonkopliku merged commit bc3abb4 into main Jul 26, 2024
95 of 96 checks passed
@nelsonkopliku nelsonkopliku deleted the use-correct-data-from-activity-log-api branch July 26, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request env Create an ephimeral environment for the pr branch javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

2 participants