Open Larsundso opened 3 months ago
I'm not sure what other webhook endpoints are affected, but DELETE webhook message is too
Fixed by restarting the docker container
Edited issue
@Larsundso I think you can reopen the issue because you found a bug.
I can repro reliably by trying to get a message that don't/no longer exists.
Repro steps:
curl -i -X POST -H 'Content-Type: application/json' http://nirn-proxy.prod.svc.cluster.local/api/webhooks/:id/:token?wait=true -d '{"content":"test"}'
curl -i http://nirn-proxy.prod.svc.cluster.local/api/webhooks/:id/:token/messages/:id
{"message": "404: Not Found", "code": 0}
as expected.The issue likely lies here: https://github.com/germanoeich/nirn-proxy/blob/23fc2e790b136134283a985c4b779ecc1ba389f4/lib/queue.go#L351-L358
It should additionally check if the body code is 10015 (Unknown webhook).
I looked to make a PR but I'm not sure how to parse the body and I'm not a go dev :(
How to reproduce:
Possible prerequisites
Every time i restarted the docker image it would work for 5-10 seconds before returning 404 again The error description would be "No Description" I encountered this only after releasing a Feature that would utilize several hundred webhooks sending several thousand requests per minute combined