Skip to main content

This is possibly a really silly question, but I am writing a custom app, on these 2 functions there is a parameter for an error message, but where is that surfaced?


I have added PD.fail("Foo") to the top of my transformer and called the endpoint, I still get a success response, although of course no incident is created as it doesn’t get to the PD.emitEventsV2


I tried searching here and was surprised not to fail anything

Hello @stephen, looks like the issue/question is related to the event transformer service. It might be the case that your transform JS needs to call PD.emitChangeEvents instead of PD.emitEventsV2 .


📚 See Change Event Transformer docs

📚 How to add an event transformer to an app


In the meantime, i’m checking if we can get more insights from the ProdDev team.


Sorry, maybe I wasn’t very clear, I have events emitting absolutely fine, I am trying to understand how you are supposed to be aware of errors which occur, i.e. if you call PD.fail, as the API call does not respond with them and I can find no where in PagerDuty where they are surfaced


@stephen, with event transforms there’s an Debug Mode option that seems to swallow JS errors if disabled. We tried to reproduce this by creating an event transform integration, turning off debug mode and no incidents get created. Turning it back on and an incidents get created, displaying the failure reason.


59


There is some additional documentation about the use of PD.fail and PD.assertType here. The transform calls PD.fail the events are dropped, so they do not surface / show up anywhere.


That is on the Custom Event Transformer though, not on a Custom App, the Debug Mode option is not there for apps


Sorry @xenda amici any word on this? It seems to be completely impossible to debug issues with Custom Apps even though this page https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgz-custom-change-event-transformer says using a Custom App is now the preferred way


Reply