Missing "topic" web hook events in cloud hosted instance

Hey there, we at Balena have hosted instance at https://forums.balena.io. While working on a custom integration, I’ve seen that Discourse may sometimes not emit certain web hooks.

We are listening to post_event and topic_event events, and from what I can see, I’ve only seen this issue on topic events.

If I go to the web hooks dashboard, I may see that some events failed with an status code 0, but its not clear what the error was:

I was able to reproduce the 0 status codes by making my web server time out the HTTP request, but in other cases I would see status 0 right away after doing an action in Discourse, without waiting for a timeout.

Redelivering the web hook events tends to work, even though I sometimes get a mysterious 500 error without any explanations, and re-delivering is not possible.

The most worrying bit is that I’ve seen some events not getting delivered, and not even appearing on Discourse’s web hooks dashboard at all.

Is this a known issue? Would there be any reason for this to only happen on topic events?

We have a server receiving web hook events from other services as well, such as GitHub, and we never experienced anything similar, so its unlikely that our server is failing to serve the HTTP request.

1 Like

This is the 500 error messages without any further explanation that I get when re-trying some of the status code 0 events:

Hmm any ideas on this @vinothkannans?

1 Like

Recently @Tarek_Khalil did some improvements in web hook emitter job. I will recommend you to upgrade and test with the latest version of Discourse.

3 Likes

Since you’re hosted with us I will deploy your instance to the latest version and I will test the issue sooner.

3 Likes

Thanks @vinothkannans!

I’ll run some tests in the next couple of days and will let you know if I see any difference!

3 Likes

Now you can view the error detail at Response field.

I’m able to reproduce it. I will fix the issue in Discourse core.

I hope it’s not a case anymore with all new improvements. Anyway may I know which events they are? (like topic_destroyed or topic_closed?).

3 Likes

Note that this was happening when the webhook was unable to reach the endpoint and was being rescued. We have now changed the connection failed error code to -1 so as to clearly indicate that the webhook event failed, and added the rescue error details in response body.

4 Likes

@vinothkannans

I hope it’s not a case anymore with all new improvements. Anyway may I know which events they are? (like topic_destroyed or topic_closed ?).

From what I can remember, all the cases happened with topic_opened.

3 Likes