Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(action): debug empty response #2160

Merged
merged 3 commits into from
May 15, 2024
Merged

Conversation

bodinsamuel
Copy link
Collaborator

@bodinsamuel bodinsamuel commented May 15, 2024

Describe your changes

There is an ongoing issue where a customer receive a 500 when running an action but without any log showing

  • Log more stuff (to revert)
  • Fix res.send was used to output the body but could fail if the body was a number, express would interpret that as a wrong status code

@bodinsamuel bodinsamuel requested review from TBonnin and khaliqgant and removed request for TBonnin May 15, 2024 13:08
@bodinsamuel bodinsamuel marked this pull request as ready for review May 15, 2024 13:08
@@ -430,6 +430,7 @@ class SyncController {
await logCtx.failed();
span.finish();

next(actionResponse.error);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe I'm crazy but this if never worked?

Copy link
Collaborator

Choose a reason for hiding this comment

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

that would be a good job for a compiler/linter to tell you an handler doesn't call next or send ;)

@bodinsamuel bodinsamuel requested a review from TBonnin May 15, 2024 13:10
@bodinsamuel bodinsamuel merged commit 9f20a4f into master May 15, 2024
20 checks passed
@bodinsamuel bodinsamuel deleted the fix/debug-action-response branch May 15, 2024 13:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants