aletrn commited on
Commit
8c1934b
·
1 Parent(s): 150cbc9

[fix] fix wrong response statusCode

Browse files
Files changed (1) hide show
  1. src/app.py +3 -2
src/app.py CHANGED
@@ -48,8 +48,9 @@ def get_response(status: int, start_time: float, request_id: str, output: BBoxWi
48
  raise KeyError("status 200, but missing BBoxWithPointInput argument.")
49
  response = {
50
  "statusCode": status,
51
- "Content-Type": content_types.APPLICATION_JSON if status == 200 else content_types.TEXT_PLAIN,
52
- "body": body
 
53
  }
54
  logger.info(f"response type:{type(response)} => {response}.")
55
  return json.dumps(response)
 
48
  raise KeyError("status 200, but missing BBoxWithPointInput argument.")
49
  response = {
50
  "statusCode": status,
51
+ "header": {"Content-Type": content_types.APPLICATION_JSON if status == 200 else content_types.TEXT_PLAIN},
52
+ "body": body,
53
+ "isBase64Encoded": False
54
  }
55
  logger.info(f"response type:{type(response)} => {response}.")
56
  return json.dumps(response)