nicklaw5/helix

Error nil

loyalldo opened this issue · 6 comments

Hey Hey,
is it a Bug, that you return everytime a nil as error. It will be a fatal NullPointer exception and the catch of errors will be triggert.

Greeting
Marcel

helix/helix.go

Line 110 in a74e7ff

return client, nil

The zero value of an error is nil. I'm not sure what you mean by "NullPointer" exception?

Closing. Please re-open if you are still experiencing issues.

Sry i should not work sick... You´re totally correct.
But than i have a Question to the Webhook.
I get this Response. I think the WebhookSubscriptions should not be empty?

{ResponseCommon:{StatusCode:200 Header:map[Server:[nginx] Expires:[0] Pragma:[no-cache] Ratelimit-Limit:[800] Twitch-Trace-Id:[6d466f552f04c243125b5142fd8251c5] Vary:[Accept-Encoding] Front-End-Https:[on] Content-Type:[application/json; charset=utf-8] Access-Control-Allow-Origin:[*] Ratelimit-Remaining:[799] X-Ctxlog-Logid:[1-5c2e7e1e-e385ad0c28ec85f2a7291c06] Timing-Allow-Origin:[https://www.twitch.tv] Date:[Thu, 03 Jan 2019 21:26:55 GMT] Cache-Control:[no-cache, no-store, must-revalidate, private] Ratelimit-Reset:[1546550815]] Error: ErrorStatus:0 ErrorMessage:} Data:{Total:0 WebhookSubscriptions:[] Pagination:{Cursor:}}}

By the looks of it you don't have any subscriptions. This is working as intended. I am currently using it in production and it's working fine.

It may be that you are not verifying the webhook subscription. I suggest you follow the webhook example flow that Twitch provides.

I did make this small adjustment earlier today. So if you are using secrets as part of your webhook workflow, that may have been the reason why you might not have been able to validate a webhook subscription.

i tried to follow your docs example for Webhooks.
I cant find my Failure. Could you show me you´re live Example?