Skip to content

Commit

Permalink
MB-61670: Merge remote-tracking branch 'couchbase/neo'
Browse files Browse the repository at this point in the history
* couchbase/neo:
  MB-61670: Use KeyEnoent for generic memcached_auth_server error

Change-Id: Ic7b5396d277a32f79891f5734f966da2a5f843f4
  • Loading branch information
Peter-Searby committed May 7, 2024
2 parents 4eb065d + 10f3413 commit 7fdd6f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/memcached_auth_server.erl
Expand Up @@ -152,7 +152,7 @@ process_req(#mc_header{opcode = ?MC_AUTH_REQUEST} = Header,
[ReasonStr, UUID]),
Json = {[{error, {[{context, <<"Authentication failed">>},
{ref, UUID}]}}]},
{Header#mc_header{status = ?MC_AUTH_ERROR},
{Header#mc_header{status = ?KEY_ENOENT},
#mc_entry{data = ejson:encode(Json)},
State}
end;
Expand Down Expand Up @@ -339,7 +339,7 @@ process_data_test() ->
test_process_data(
{?MC_AUTH_REQUEST, undefined,
{[{mechanism, <<"PLAIN">>}, {challenge, <<"AGpvaG4AYmFy">>}]}},
fun (?MC_AUTH_REQUEST, ?MC_AUTH_ERROR, undefined,
fun (?MC_AUTH_REQUEST, ?KEY_ENOENT, undefined,
{[{<<"error">>, {[
{<<"context">>, <<"Authentication failed">>},
{<<"ref">>, _}]}}]}) -> ok
Expand Down

0 comments on commit 7fdd6f0

Please sign in to comment.