thread-master/internal/response/request.go

15 lines
318 B
Go

package response
import (
app "haixun-backend/internal/library/errors"
"haixun-backend/internal/library/errors/code"
"haixun-backend/internal/library/redact"
)
func WrapRequestError(err error) error {
if err == nil {
return nil
}
return app.For(code.Facade).InputInvalidFormat(redact.Message(err.Error()))
}