custom elig. api error msg ; first check elig. then create user

This commit is contained in:
GotPPay
2018-05-18 10:46:47 +02:00
parent 2e5444bed8
commit c6606a98dd
2 changed files with 49 additions and 35 deletions

View File

@@ -92,6 +92,11 @@ func ResponseAPINotFoundError(c echo.Context) error {
return ResponseAPIError(c, http.StatusNotFound, "Not Found", false)
}
//ResponseAPINotEligible returns a standard API not eligible to the response
func ResponseAPINotEligibleError(c echo.Context) error {
return ResponseAPIError(c, http.StatusForbidden, "Eligibility Not Found or Error", false)
}
func ignoreDefaultWrappedErrors(c echo.Context, errorToHandle *errors.WrappedError, handler func(echo.Context, error) error) error {
err := errorToHandle.GetOriginalError()