Skip to content

Conversation

@zaneli
Copy link

@zaneli zaneli commented Nov 22, 2022

Now, wrapped errors are always handle as 500.
I want to fix it.

import (
  "golang.org/x/xerrors"
  routing "github.com/qiangxue/fasthttp-routing"
  "github.com/valyala/fasthttp"
)

  ...
  err := routing.NewHTTPError(fasthttp.StatusBadRequest)
  return xerrors.Errorf("bad request: %w", err)

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.

1 participant