diff --git a/internal/adapters/api/api_adapter.go b/internal/adapters/api/api_adapter.go index fee4833..e5ec49e 100644 --- a/internal/adapters/api/api_adapter.go +++ b/internal/adapters/api/api_adapter.go @@ -373,5 +373,8 @@ func (h *APIHandler) GetExitRequests(w http.ResponseWriter, r *http.Request) { func writeErrorResponse(w http.ResponseWriter, message string, statusCode int) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(statusCode) - json.NewEncoder(w).Encode(map[string]string{"error": message}) + json.NewEncoder(w).Encode(map[string]interface{}{ + "error": message, + "status_code": statusCode, + }) }