Skip to content

Commit 691cebf

Browse files
authored
Merge pull request #11 from jahands/fix-invalid-auth
fix: Add not_authorized to ResultEncoder
2 parents dc233b2 + c7a94c4 commit 691cebf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/srh/http/result_encoder.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
defmodule Srh.Http.ResultEncoder do
22

3+
# Authentication errors don't get encoded, we need to skip over those
4+
def encode_response({:not_authorized, message}) do
5+
{:not_authorized, message}
6+
end
7+
38
# Errors don't get encoded, we need to skip over those
49
def encode_response({:redis_error, error_result_map}) do
510
{:redis_error, error_result_map}

0 commit comments

Comments
 (0)