Closed BugCommiter closed 3 years ago
Hey, thanks for filing an issue. I'm going to need more info in order to figure out what is going wrong. How are you calling the API and with what arguments?
Error appear if this condition is true
You may have some luck examining the log output when running the CLI with the DEBUG
environment variable set (as shown here).
I think what may be happening is that the Content-Length
header is not being computed correctly.
In a port we use in stdlib
, we compute the byte length, rather than the string length.
If you wouldn't mind testing locally to confirm that modifying how the Content-Length
header is set resolves the issue and submitting a PR, that would be greatly appreciated!
Thanks!
What should i do?
You can try changing the line which sets the Content-Length
header to first convert the serialized request data
to a Node.js Buffer
and then set the Content-Length
header to the byteLength
of the Buffer
.
Deleting this string was fixed my error
Yeah, that should work, as well.
Hello, I have a error with types. However, when I used typeof() to check type of variable all alright (My variable is string )
Type of Image: string
{ limit: 5000, remaining: 4993, reset: 1628201207 } Error: {"message":"Invalid request.\n\nFor 'links/0/schema', \"body\" is not an object.","documentation_url":"https://docs.github.com/rest/reference/issues#create-an-issue"} at clbk (D:\Github desktop\GMC_adminBot\src\commands\bug.js:105:19) at done (D:\Github desktop\GMC_adminBot\node_modules\github-create-issue\lib\create.js:72:3) at done (D:\Github desktop\GMC_adminBot\node_modules\github-create-issue\lib\query.js:65:11) at onError (D:\Github desktop\GMC_adminBot\node_modules\github-create-issue\lib\request.js:61:10) at IncomingMessage.onEnd (D:\Github desktop\GMC_adminBot\node_modules\github-create-issue\lib\request.js:107:11) at IncomingMessage.emit (events.js:387:35) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) [ERROR] 00:27:06 Error: {"message":"Invalid request.\n\nFor 'links/0/schema', \"body\" is not an object.","documentation_url":"https://docs.github.com/rest/reference/issues#create-an-issue"} [INFO] 00:27:25 Restarting: D:\Github desktop\GMC_adminBot\src\commands\bug.js has been modified