MCPcopy
hub / github.com/benoitc/gunicorn / make_error_response

Function make_error_response

gunicorn/ctl/protocol.py:209–224  ·  view source on GitHub ↗

Create an error response message. Args: request_id: Request identifier being responded to error: Error message Returns: Error response dictionary

(request_id: int, error: str)

Source from the content-addressed store, hash-verified

207
208
209def make_error_response(request_id: int, error: str) -> dict:
210 """
211 Create an error response message.
212
213 Args:
214 request_id: Request identifier being responded to
215 error: Error message
216
217 Returns:
218 Error response dictionary
219 """
220 return {
221 "id": request_id,
222 "status": "error",
223 "error": error,
224 }

Calls

no outgoing calls