MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / error

Method error

openlibrary/plugins/importapi/code.py:163–166  ·  view source on GitHub ↗
(self, error_code, error="Invalid item", **kwargs)

Source from the content-addressed store, hash-verified

161 """/api/import endpoint for general data formats."""
162
163 def error(self, error_code, error="Invalid item", **kwargs):
164 content = {"success": False, "error_code": error_code, "error": error}
165 content.update(kwargs)
166 raise web.HTTPError("400 Bad Request", data=json.dumps(content))
167
168 def POST(self):
169 web.header("Content-Type", "application/json")

Callers 15

POSTMethod · 0.95
save_errorFunction · 0.45
POSTMethod · 0.45
_get_blog_feedsFunction · 0.45
get_loan_keyFunction · 0.45
validateMethod · 0.45
get_ia_import_recordMethod · 0.45
POSTMethod · 0.45
_ensure_store_entryMethod · 0.45
POSTMethod · 0.45
POSTMethod · 0.45
GETMethod · 0.45

Calls 2

dumpsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected