From 46e08be073e67a49e8c9f85fd7c858956c32d60e Mon Sep 17 00:00:00 2001 From: itsscb Date: Sat, 23 Sep 2023 23:22:33 +0200 Subject: [PATCH] rf/replaces http.Status of api.GetAccount --- api/account.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/account.go b/api/account.go index 17de652..6f8410b 100644 --- a/api/account.go +++ b/api/account.go @@ -74,7 +74,7 @@ func (server *Server) getAccount(ctx *gin.Context) { return } - ctx.JSON(http.StatusBadRequest, errorResponse(err)) + ctx.JSON(http.StatusInternalServerError, errorResponse(err)) return } @@ -101,7 +101,7 @@ func (server *Server) listAccounts(ctx *gin.Context) { accounts, err := server.store.ListAccounts(ctx, arg) if err != nil { - ctx.JSON(http.StatusBadRequest, errorResponse(err)) + ctx.JSON(http.StatusInternalServerError, errorResponse(err)) return }