Skip to content
Snippets Groups Projects
Commit 703bfbeb authored by kpayson64's avatar kpayson64 Committed by GitHub
Browse files

Merge pull request #7239 from jboeuf/fix_7182

Change the return status codes according to the doc
parents 5a412cf8 f0ae3e39
No related branches found
No related tags found
No related merge requests found
...@@ -176,7 +176,7 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, ...@@ -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, ...@@ -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);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment