diff --git a/api/lambda.go b/api/lambda.go index d18f1316f2e114ec6a1cc40a57a62cfd6207290e..c229eef9b0cfeb8d075eab60e0c26735e55ee53d 100644 --- a/api/lambda.go +++ b/api/lambda.go @@ -258,7 +258,12 @@ func (api Api) Handler(baseCtx context.Context, apiGatewayProxyReq events.APIGat //handler succeeded, some handler does not have a response data (typically post/put/patch/delete) err = nil - res.StatusCode = http.StatusOK + switch apiGatewayProxyReq.HTTPMethod { + case http.MethodDelete: + res.StatusCode = http.StatusNoContent + default: + res.StatusCode = http.StatusOK + } if len(results) > 1 { responseStruct := results[0].Interface()