Changeset - 4780af2c6ff2
[Not reviewed]
default
0 2 0
Mads Kiilerich - 6 years ago 2019-12-27 01:50:40
mads@kiilerich.com
Grafted from: 690ac9063ad4
api: better error logging for API usage errors - say which request failed to encode response
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/api/__init__.py
Show inline comments
 
@@ -240,7 +240,7 @@ class JSONRPCController(TGController):
 
        try:
 
            return json.dumps(response)
 
        except TypeError as e:
 
            log.error('API FAILED. Error encoding response: %s', e)
 
            log.error('API FAILED. Error encoding response for %s %s: %s\n%s', action, rpc_args, e, traceback.format_exc())
 
            return json.dumps(
 
                dict(
 
                    id=self._req_id,
kallithea/controllers/api/api.py
Show inline comments
 
@@ -2400,7 +2400,7 @@ class ApiController(JSONRPCController):
 
            pull_request=pull_request.pull_request_id,
 
            f_path=None,
 
            line_no=None,
 
            status_change=(ChangesetStatus.get_status_lbl(status)),
 
            status_change=ChangesetStatus.get_status_lbl(status),
 
            closing_pr=close_pr
 
        )
 
        action_logger(apiuser,
0 comments (0 inline, 0 general)