MCPcopy Index your code
hub / github.com/StackStorm/st2 / handle_error

Method handle_error

st2client/st2client/models/core.py:207–218  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

205
206 @staticmethod
207 def handle_error(response):
208 try:
209 content = parse_api_response(response)
210 fault = content.get("faultstring", "") if content else ""
211 if fault:
212 response.reason += "\nMESSAGE: %s" % fault
213 except Exception as e:
214 response.reason += (
215 "\nUnable to retrieve detailed message "
216 "from the HTTP response. %s\n" % six.text_type(e)
217 )
218 response.raise_for_status()
219
220 @add_auth_token_to_kwargs_from_env
221 def get_all(self, **kwargs):

Callers 15

get_allMethod · 0.95
get_by_idMethod · 0.95
get_propertyMethod · 0.95
_query_detailsMethod · 0.95
createMethod · 0.95
updateMethod · 0.95
deleteMethod · 0.95
delete_actionMethod · 0.95
cloneMethod · 0.95
delete_by_idMethod · 0.95
get_user_infoMethod · 0.45
matchMethod · 0.45

Calls 3

parse_api_responseFunction · 0.85
getMethod · 0.45
raise_for_statusMethod · 0.45

Tested by

no test coverage detected