tcWebHooks
tcWebHooks copied to clipboard
Exception when trying to use Responsibility changed event
While trying to setup notification for this event, in the preview and test window I'm getting:
Error has occurred during request processing, status code: 500 (Internal Server Error). Details: java.lang.NullPointerException Error occurred while processing this request.
and when trying to send a test:
Error: Cannot invoke "String.equals(Object)" because the return value of "webhook.teamcity.payload.WebHookPayloadTemplate.getTemplateId()" is null (999)
The log gives a bit more details:
Error has occurred during request processing, status code: 500 (Internal Server Error). Details: java.lang.NullPointerException: Cannot invoke "webhook.teamcity.settings.config.WebHookTemplateConfig.getFormat()" because the return value of "webhook.teamcity.payload.WebHookTemplateManager.getTemplateConfig(String, webhook.teamcity.payload.WebHookTemplateManager$TemplateState)" is null. Error occurred while processing this request. Request: POST '/app/rest/webhooks/test/template/preview', from client 10.0.12.153:52849, authenticated as user with id=77. java.lang.NullPointerException: Cannot invoke "webhook.teamcity.settings.config.WebHookTemplateConfig.getFormat()" because the return value of "webhook.teamcity.payload.WebHookTemplateManager.getTemplateConfig(String, webhook.teamcity.payload.WebHookTemplateManager$TemplateState)" is null
TC 2024.12.3 tcWebHooks-2.0.1-build.502
Thanks. I am able to reproduce this. It appears for me when I am editing a template and wanting to preview it. I can't get it to error when editing a webhook.
I've found the problem. I just need to figure out how to fix it. 🤣
Thanks for looking into it, looking forward to a new build. Btw, this event should be triggered whenever build investigation status is changed (aka investigation assigned to a user), right? Because that's what I was trying to achieve here.
Yes, that's right. Also when it is assigned to someone else, or unassigned.
v2.0.3-rc.1 released
Thank you, I can confirm that preview is working and the event is being triggered and sent.