MCPcopy
hub / github.com/FlareSolverr/FlareSolverr / JSONErrorBottle

Class JSONErrorBottle

src/flaresolverr.py:21–27  ·  view source on GitHub ↗

Handle 404 errors

Source from the content-addressed store, hash-verified

19
20
21class JSONErrorBottle(Bottle):
22 """
23 Handle 404 errors
24 """
25 def default_error_handler(self, res):
26 response.content_type = 'application/json'
27 return json.dumps(dict(error=res.body, status_code=res.status_code))
28
29
30app = JSONErrorBottle()

Callers 1

flaresolverr.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected