Change error messages according to instructions document

This commit is contained in:
GotPPay
2018-05-22 13:51:12 +02:00
parent d8737a558b
commit fb8b8f63af
2 changed files with 28 additions and 27 deletions

View File

@@ -39,7 +39,7 @@ func ResponseAPIErrorWithData(c echo.Context, status int, message string, redire
Error: true,
Message: message,
Redirect: redirect,
Data: data,
Data: data,
}
return c.JSON(status, returnValue)
@@ -92,11 +92,12 @@ func ResponseAPINotFoundError(c echo.Context) error {
return ResponseAPIError(c, http.StatusNotFound, "Not Found", false)
}
//ResponseAPINotEligible returns a standard API not eligible to the response
//ResponseAPINotEligibleError 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)
return ResponseAPIError(c, http.StatusForbidden, "Member does not have active insurance coverage", false)
}
//ResponseAPINotEligibleWithMessageError returns a standard API not eligible to the response with custom message
func ResponseAPINotEligibleWithMessageError(c echo.Context, message string) error {
return ResponseAPIError(c, http.StatusForbidden, message, false)
}