Skip to content

Commit

Permalink
restore test-proxy error response to before typespec creation (#9496)
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd authored Dec 9, 2024
1 parent 477ff2f commit 2fe7528
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public async Task Invoke(HttpContext context)
response.Headers.Append("x-request-known-exception", "true");
response.Headers.Append("x-request-known-exception-error", encodedException);
}

var bodyObj = new
{
Message = e.Message,
Status = e.StatusCode
Status = e.StatusCode.ToString()
};

DebugLogger.LogError(e.Message);
Expand All @@ -85,7 +85,7 @@ public async Task Invoke(HttpContext context)
var bodyObj = new
{
Message = e.Message,
Status = unexpectedStatusCode,
Status = unexpectedStatusCode.ToString(),
StackTrace = e.StackTrace,
};

Expand Down
2 changes: 1 addition & 1 deletion tools/test-proxy/typespec/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ model StartPayload {

model CommonErrorResponse {
Message: string;
Status: int32;
Status: string;
StackTrace?: string;
@header("x-request-exception") requestException: boolean;
@header("x-request-exception-error") requestExceptionError: string;
Expand Down

0 comments on commit 2fe7528

Please sign in to comment.