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

Method to_dict

gunicorn/dirty/errors.py:25–31  ·  view source on GitHub ↗

Serialize error for protocol transmission.

(self)

Source from the content-addressed store, hash-verified

23 return self.message
24
25 def to_dict(self):
26 """Serialize error for protocol transmission."""
27 return {
28 "error_type": self.__class__.__name__,
29 "message": self.message,
30 "details": self.details,
31 }
32
33 @classmethod
34 def from_dict(cls, data):

Callers 5

encode_errorMethod · 0.45
make_error_responseFunction · 0.45
test_error_serializationFunction · 0.45

Calls

no outgoing calls

Tested by 3

test_error_serializationFunction · 0.36