Skip to content

Conversation

@appleboy
Copy link
Member

@appleboy appleboy commented Jul 18, 2025

  • Improve panic handling in the timeout middleware by capturing both the panic value and stack trace
  • In debug mode, return detailed panic information and stack trace in the HTTP response
  • Refactor panic channel to transmit structured panic data instead of a generic interface
  • Update panic rethrow logic to use the new structured panic information
  • Remove the old panic handling test and add a new test to verify panic capture and response with custom recovery middleware

fix #66
fix #36
fix #70

appleboy added 2 commits July 18, 2025 14:52
- Improve panic handling in the timeout middleware by capturing both the panic value and stack trace
- In debug mode, return detailed panic information and stack trace in the HTTP response
- Refactor panic channel to transmit structured panic data instead of a generic interface
- Update panic rethrow logic to use the new structured panic information
- Remove the old panic handling test and add a new test to verify panic capture and response with custom recovery middleware

fix #66

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Assign the return value of c.Error to a blank identifier to satisfy the errcheck linter
- Replace Write([]byte(fmt.Sprintf(...))) with fmt.Fprintf to address staticcheck recommendations
- Split a long test comment into two lines for improved readability

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@appleboy appleboy added the bug Something isn't working label Jul 18, 2025
@appleboy appleboy merged commit ff7b0b4 into master Jul 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

2 participants