tcWebHooks icon indicating copy to clipboard operation
tcWebHooks copied to clipboard

Exception when trying to use Responsibility changed event

Open ebol666 opened this issue 7 months ago • 6 comments

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

ebol666 avatar May 09 '25 12:05 ebol666

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.

netwolfuk avatar May 09 '25 20:05 netwolfuk

I've found the problem. I just need to figure out how to fix it. 🤣

netwolfuk avatar May 09 '25 22:05 netwolfuk

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.

ebol666 avatar May 12 '25 07:05 ebol666

Yes, that's right. Also when it is assigned to someone else, or unassigned.

netwolfuk avatar May 12 '25 07:05 netwolfuk

v2.0.3-rc.1 released

netwolfuk avatar May 18 '25 23:05 netwolfuk

Thank you, I can confirm that preview is working and the event is being triggered and sent.

ebol666 avatar May 29 '25 14:05 ebol666