π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[server] Return empty json on error
Neeraj Gupta86b0c820659b
diff --git a/server/pkg/utils/handler/handler.go b/server/pkg/utils/handler/handler.goindex c264fb452d..542057a0df 100644--- a/server/pkg/utils/handler/handler.go+++ b/server/pkg/utils/handler/handler.go@@ -53,14 +53,14 @@ func Error(c *gin.Context, err error) {if isEnteApiErr {c.AbortWithStatusJSON(enteApiErr.HttpStatusCode, enteApiErr)} else if httpStatus := httpStatusCode(err); httpStatus != 0 {- c.AbortWithStatus(httpStatus)+ c.AbortWithStatusJSON(httpStatus, gin.H{})} else {if _, ok := stacktrace.RootCause(err).(validator.ValidationErrors); ok {- c.AbortWithStatus(http.StatusBadRequest)+ c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{})} else if isClientError {- c.AbortWithStatus(http.StatusBadRequest)+ c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{})} else {- c.AbortWithStatus(http.StatusInternalServerError)+ c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{})}}}