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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [Bug]: Fiber masks errors raised in fasthttp #2257

Closed
3 tasks done
WoLfulus opened this issue Dec 4, 2022 · 1 comment 路 Fixed by #2267
Closed
3 tasks done

馃悰 [Bug]: Fiber masks errors raised in fasthttp #2257

WoLfulus opened this issue Dec 4, 2022 · 1 comment 路 Fixed by #2267

Comments

@WoLfulus
Copy link

WoLfulus commented Dec 4, 2022

Bug Description

Fiber will mask any internal error in fasthttp with a BadRequest response. This was a pain to debug, even with stack traces the original error won't popup. The only I could find the error was to modify fiber to drop the err = ErrBadRequest overwrite in server.go to let the original fasthttp error to land on my ErrorHandler

Would be nice to at least wrap the original error in order to get the reason why something is failing.

How to Reproduce

Steps to reproduce the behavior:

Build a file uploader without streaming, build it inside a scratch container, and try to read the multipart file.

The error will be masked with a Bad Request (in this case it was a missing /tmp folder inside the scratch containerin which fasthttp couldn't write/read from)

Expected Behavior

Be able to view original error reasons when they happen

Fiber Version

v2.40.1

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.
@welcome
Copy link

welcome bot commented Dec 4, 2022

Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants