Skip to content

Commit 2020d6b

Browse files
committed
return HTTP accepted on error
1 parent 0a6af5b commit 2020d6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/AWSLambdaRuntime/Lambda+LocalServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ internal struct LambdaHTTPServer {
452452
await self.responsePool.push(
453453
LocalServerResponse(
454454
id: requestId,
455-
status: .ok,
455+
status: .accepted,
456456
// the local server has no mecanism to collect headers set by the lambda function
457457
headers: HTTPHeaders(),
458458
body: body,

Sources/MockServer/MockHTTPServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ struct HttpServer {
224224
} else if requestHead.uri.hasSuffix("/response") {
225225
responseStatus = .accepted
226226
} else if requestHead.uri.hasSuffix("/error") {
227-
responseStatus = .ok
227+
responseStatus = .accepted
228228
} else {
229229
responseStatus = .notFound
230230
}

0 commit comments

Comments
 (0)