Skip to content

Commit 2b07033

Browse files
committed
Make connection error throw an Upstash Error
1 parent 6c22d58 commit 2b07033

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/srh/http/base_router.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ defmodule Srh.Http.BaseRouter do
8989
%{code: 401, message: message, json: false}
9090

9191
{:connection_error, message} ->
92-
%{code: 500, message: message, json: false}
92+
%{code: 500, message: Jason.encode!(%{error: message}), json: true}
9393

9494
{:server_error, _} ->
9595
%{code: 500, message: "An error occurred internally", json: false}

lib/srh/http/command_handler.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ defmodule Srh.Http.CommandHandler do
194194

195195
{
196196
:connection_error,
197-
"Unable to connect to the Redis server"
197+
"SRH: Unable to connect to the Redis server. See SRH logs for more information."
198198
}
199199

200200
_ ->

0 commit comments

Comments
 (0)