catch panic in gin

This commit is contained in:
2022-12-28 00:32:15 +01:00
parent cebb2ae2b6
commit 679277d59e
3 changed files with 23 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ func SendAPIError(g *gin.Context, status int, errorid apierr.APIError, highlight
}
func NotImplemented(g *gin.Context) HTTPResponse {
return createApiError(g, "NotImplemented", 500, apierr.UNDEFINED, 0, "Not Implemented", nil)
return createApiError(g, "NotImplemented", 500, apierr.NOT_IMPLEMENTED, 0, "Not Implemented", nil)
}
func createApiError(g *gin.Context, ident string, status int, errorid apierr.APIError, highlight apihighlight.ErrHighlight, msg string, e error) HTTPResponse {