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()))
}
