func (api *API) sendResponse(c echo.Context, ...) error {
...
if ok {
if evt.Error != nil {
return c.JSONBlob(statuscodes.HttpStatusDiagnosticsCheckError, resBytes)
}
}
return c.JSONBlob(http.StatusOK, resBytes)
}
I have created a custom status code with code 512. However, because 512 has no entry in the statusText map[int]string(https://go.dev/src/net/http/status.go), the message in the screenshot(Postman) just says "status code 512". How can I enable custom status texts so that I can see a meaningful message instead?