AnswerDotAI / AnswerDotAI/ghapi

Return error description functionality

Open
#138 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
685
Forks
70
Avg merge
1m
Merged PRs (30d)
2

Description

Hey guys,

Do you know if is possible get the error message in Python instead a generic error message?

If yes, please let me know. If not, could be a good solution to help troubleshooting.

Expected error output:
**Error: Branch feature/test-api-github2 not found**
File "C:\Users\xxx\AppData\Roaming\Python\Python310\site-packages\ghapi\core.py", line 63, in __call__
return self.client(self.path, self.verb, headers=headers, route=route_p, query=query_p, data=data_p)
File "C:\Users\victo\AppData\Roaming\Python\Python310\site-packages\ghapi\core.py", line 112, in __call__
res,self.recv_hdrs = urlsend(path, verb, headers=headers or None, debug=self.debug, return_headers=True,
File "C:\Users\xxx\AppData\Roaming\Python\Python310\site-packages\fastcore\net.py", line 212, in urlsend
return urlread(req, return_json=return_json, return_headers=return_headers)
File "C:\Users\xxx\AppData\Roaming\Python\Python310\site-packages\fastcore\net.py", line 113, in urlread
if 400 <= e.code < 500: raise ExceptionsHTTP[e.code](e.url, e.hdrs, e.fp) from None

Current the error output:
File "C:\Users\xxx\AppData\Roaming\Python\Python310\site-packages\ghapi\core.py", line 63, in __call__
return self.client(self.path, self.verb, headers=headers, route=route_p, query=query_p, data=data_p)
File "C:\Users\victo\AppData\Roaming\Python\Python310\site-packages\ghapi\core.py", line 112, in __call__
res,self.recv_hdrs = urlsend(path, verb, headers=headers or None, debug=self.debug, return_headers=True,
File "C:\Users\xxx\AppData\Roaming\Python\Python310\site-packages\fastcore\net.py", line 212, in urlsend
return urlread(req, return_json=return_json, return_headers=return_headers)
File "C:\Users\xxx\AppData\Roaming\Python\Python310\site-packages\fastcore\net.py", line 113, in urlread
if 400 <= e.code < 500: raise ExceptionsHTTP[e.code](e.url, e.hdrs, e.fp) from None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.