From 5fffbba3b851f6cebfd0e616bef2ff6f0c520c3d Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Sun, 2 Feb 2025 18:57:30 -0600 Subject: Fix error handling --- server/errors/models.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/errors/models.go') diff --git a/server/errors/models.go b/server/errors/models.go index 2b90d21..1104c4f 100644 --- a/server/errors/models.go +++ b/server/errors/models.go @@ -10,9 +10,9 @@ type AppError struct { } func NewAppError(status int, msg string) *AppError { - msgJson, err := json.Marshal(map[string]string{"message": msg}) + msgJSON, err := json.Marshal(map[string]string{"message": msg}) if err != nil { - msgJson, _ = json.Marshal(map[string]string{"message": err.Error()}) + msgJSON, _ = json.Marshal(map[string]string{"message": err.Error()}) } - return &AppError{status, msgJson} + return &AppError{status, msgJSON} } -- cgit v1.2.3