Spaces:
Sleeping
Sleeping
Merge pull request #11 from jahands/fix-invalid-auth
Browse files
lib/srh/http/result_encoder.ex
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
defmodule Srh.Http.ResultEncoder do
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
# Errors don't get encoded, we need to skip over those
|
4 |
def encode_response({:redis_error, error_result_map}) do
|
5 |
{:redis_error, error_result_map}
|
|
|
1 |
defmodule Srh.Http.ResultEncoder do
|
2 |
|
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 |
+
|
8 |
# Errors don't get encoded, we need to skip over those
|
9 |
def encode_response({:redis_error, error_result_map}) do
|
10 |
{:redis_error, error_result_map}
|