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

Bugfix: Remove 500 Errors in Conversation Dashboard #420

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

Svenstar74
Copy link
Collaborator

Description

Right now if you are on the main branch, login, go to the conversation screen and open the drawer with all the conversation cards, you will probably get some console log statements like in the screenshot below. The number of errors depends on the amount of conversation cards you have and the state they are in.

image

Those error messages came from the ViewSelectedTopicsModal, because it wanted to call apiClient.getSelectedTopics for conversations that weren't in a conversation state where this call is possible. So by adding an if check for the conversation state before the api call, the errors disappeared.

Checklist

  • I have tested this code.
  • I have updated the documentation.
  • I don't add technical debt with this pr.

Additional Comments

I checked that I don't add technical debt with this pr, which probably is true. But there is already existing technical debt that we need to address in the future. This involves cleaning up the components and extracting the logic into hooks, similar to the quiz refactoring we did.

Copy link

🚀 Expo preview is ready!

  • Project → climate-mind
  • Platforms → android, ios
  • Runtime Version → exposdk:49.0.0
  • More info

Learn more about 𝝠 Expo Github Action

Copy link
Collaborator

@epixieme epixieme left a comment

Choose a reason for hiding this comment

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

Still get the 500 errors if clicking the more button. Going to test at what point this happens in the code

@epixieme epixieme self-requested a review December 12, 2023 09:46
@epixieme
Copy link
Collaborator

Ignore my previous comment. This is actually when opening the conversation drawer still and the number of 500 errs doesn't match what I have available. Maybe worth checking backend?

Copy link
Collaborator

@epixieme epixieme left a comment

Choose a reason for hiding this comment

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

fixed after I remove all conversations and start again.

@Svenstar74 Svenstar74 merged commit 33b3b7f into main Dec 12, 2023
1 check passed
@Svenstar74 Svenstar74 deleted the bugfix/remove-500-errors-in-conversation-dashboard branch December 12, 2023 12:51
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