Closed azrosen92 closed 3 years ago
Hello, can you make sure that your github token is up-to-date with the correct permission? (this is usually the case for this kind of error)
Anyway, I need to improve the error feedback for permission issues
(Note: I did try, this is working for me, we are using the github integration almost everyday, this is why I'm suspecting some bad configuration somewhere)
Thank you! I think I found the permissions issue – I updated the README to fix it here https://github.com/contiamo/restful-react/pull/358
Describe the bug When running
restful-react import --github "username:repo:branch:path/to/openapi.yaml"
, the CLI always errors out with(node:77636) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'text' of null
. This used to work, and nothing has changed about my configuration, so I'm wondering if there's been a change to the Github API which has broken this feature?I printed out the response body in the restful-react script and it's returning
It appears to be failing at this line, which tries to access to text from the returned file – https://github.com/contiamo/restful-react/blob/master/src/bin/restful-react-import.ts#L212.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.