Skip to content

Fix logger middleware causing 500 error if request has body workaround#392

Merged
Yarik-Popov merged 1 commit intomainfrom
391-logger-middleware-causes-500-internal-server-if-request-has-body
May 11, 2025
Merged

Fix logger middleware causing 500 error if request has body workaround#392
Yarik-Popov merged 1 commit intomainfrom
391-logger-middleware-causes-500-internal-server-if-request-has-body

Conversation

@Yarik-Popov
Copy link
Contributor

@Yarik-Popov Yarik-Popov commented May 11, 2025

Purpose

Closes #391. This PR is intended to be a workaround to the issue. We still should be logging the request body, see the Outstanding Changes.

New Changes

  • Comment out the lines causing the crash

Testing

  • I've tested that these exact changes fix the crash described in the linked issue by making the same changes on 361-create-endpoints-for-aro-user

Outstanding Changes

  • Make the logger middleware log the request body
  • Make the logger middleware log the request information before the call_next line

@Yarik-Popov Yarik-Popov linked an issue May 11, 2025 that may be closed by this pull request
@Yarik-Popov Yarik-Popov requested a review from kepler452b123 May 11, 2025 20:32
@github-actions
Copy link

Pull reviewers stats

Stats of the last 120 days for UWOrbital:

User Total reviews Time to review Total comments
Yarik-Popov 26 23h 59m 258
kepler452b123 25 2d 14h 30m 95
Navtajh04 5 2d 6h 2m 25
EricL521 1 6d 9h 29m 0

⚡️ Pull request stats

@Yarik-Popov Yarik-Popov self-assigned this May 11, 2025
@Yarik-Popov Yarik-Popov added bug Something isn't working project: backend Backend tasks labels May 11, 2025
@Yarik-Popov Yarik-Popov added this to the 25S milestone May 11, 2025
@Yarik-Popov Yarik-Popov merged commit f599d82 into main May 11, 2025
47 checks passed
@Yarik-Popov Yarik-Popov deleted the 391-logger-middleware-causes-500-internal-server-if-request-has-body branch May 11, 2025 20:37
Yarik-Popov added a commit that referenced this pull request May 11, 2025
… 361-create-endpoints-for-aro-user

* 'main' of https://github.com/UWOrbital/OBC-firmware:
  Fix logger middleware causing 500 error if request has body workaround (#392)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working project: backend Backend tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logger Middleware causes 500 internal server if request has body

2 participants