Update middleware logic

This commit is contained in:
Dane Everitt
2020-12-15 20:19:09 -08:00
parent 84c05efaa5
commit acd6dc62d0
10 changed files with 175 additions and 77 deletions

View File

@@ -93,7 +93,7 @@ func (e *RequestError) AbortWithStatus(status int, c *gin.Context) {
// Helper function to just abort with an internal server error. This is generally the response
// from most errors encountered by the API.
func (e *RequestError) AbortWithServerError(c *gin.Context) {
func (e *RequestError) Abort(c *gin.Context) {
e.AbortWithStatus(http.StatusInternalServerError, c)
}
@@ -128,7 +128,7 @@ func (e *RequestError) AbortFilesystemError(c *gin.Context) {
return
}
e.AbortWithServerError(c)
e.Abort(c)
}
// Format the error to a string and include the UUID.