Skip to content

Commit

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

Change-Id: Ic834aa869d1b60358d46e657009b3643b37f1874
  • Loading branch information
Peter-Searby committed May 7, 2024
2 parents 7725dfd + 7fdd6f0 commit c84d5fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/ns_server/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 c84d5fa

Please sign in to comment.