Merge pull request #7239 from jboeuf/fix_7182

Change the return status codes according to the doc
pull/6635/merge
kpayson64 9 years ago committed by GitHub
commit 703bfbeb93
  1. 4
      src/core/lib/security/transport/client_auth_filter.c

@ -176,7 +176,7 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx,
calld->creds = grpc_composite_call_credentials_create(channel_call_creds, calld->creds = grpc_composite_call_credentials_create(channel_call_creds,
ctx->creds, NULL); ctx->creds, NULL);
if (calld->creds == NULL) { if (calld->creds == NULL) {
bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, bubble_up_error(exec_ctx, elem, GRPC_STATUS_UNAUTHENTICATED,
"Incompatible credentials set on channel and call."); "Incompatible credentials set on channel and call.");
return; return;
} }
@ -205,7 +205,7 @@ static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data,
char *error_msg; char *error_msg;
gpr_asprintf(&error_msg, "Invalid host %s set in :authority metadata.", gpr_asprintf(&error_msg, "Invalid host %s set in :authority metadata.",
grpc_mdstr_as_c_string(calld->host)); grpc_mdstr_as_c_string(calld->host));
bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, error_msg); bubble_up_error(exec_ctx, elem, GRPC_STATUS_UNAUTHENTICATED, error_msg);
gpr_free(error_msg); gpr_free(error_msg);
} }
} }

Loading…
Cancel
Save