stackvana / hook.io

Open-Source Microservice Hosting Platform
https://hook.io
Other
1.26k stars 117 forks source link

Pointing hook to a gist result in errors #203

Open reimertz opened 8 years ago

reimertz commented 8 years ago

It seems you are using your own api keys to to fetch gist sources?

Might be a better solution to use a users own auth tokens?

Here is the error:

Not valid JSON: {"message":"API rate limit exceeded for Marak.","documentation_url":"https://developer.github.com/v3/#rate-limiting"}

Error: Not valid JSON: {"message":"API rate limit exceeded for Marak.","documentation_url":"https://developer.github.com/v3/#rate-limiting"}
    at IncomingMessage.<anonymous> (/root/hook.io/lib/resources/hook/fetchHookSourceCode.js:104:27)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickDomainCallback (node.js:381:11)
Marak commented 8 years ago

That doesn't seem right. It should be using your own auth tokens.

Which hook resulted in that?

reimertz commented 8 years ago

@marak http://hook.io/reimertz/vasktrafik

Marak commented 8 years ago

I'll take a look at the gist code, it's possible it was broken in the last round of updates.

In the mean-time, you should be able to just edit the source directly on the hook.io site.

reimertz commented 8 years ago

@marak awesome, thanks buddy!

Marak commented 8 years ago

@reimertz -

I took a deeper look into it. Check this out:

https://github.com/bigcompany/hook.io/blob/master/lib/resources/hook/fetchHookSourceCode.js#L80

and then:

https://github.com/bigcompany/hook.io/blob/master/lib/resources/hook/fork.js#L65

It looks like we actually have all the information and most of the code needed to make this work as intended.

I'll probably have to take a look at the gist / fork integration anyway. Any pull requests would be welcomed.

Marak commented 8 years ago

Need to resolve this, as well as do a general review of gist backed hooks.

Medium priority.

Marak commented 8 years ago

Related #224