Error 502 and missing api version in url

Hello,
I’m trying to performe migration of custom application from freshservice 2.2 to 2.3. One of necessary changes was to exchange old whitelisting from manifest.json to requests.json and requests section in manifest.json. Currently I have problem with error 502 while invoking templates. And here I have weird problem. I prepared requests.json with templates and there are hardcoded beginning of path with

‘’’
“/api/v2/tickets<%= context.path %>”
‘’’

where during invoking as a context I set up rest of url. I’m able to pack a plugin and install it in freshservice instance and when plugin tries to use functionality with this templates, it sends request which I can see in browser developer tool and there this request has status 200 but after a moment in console I see error 502 “Error in establishing connection”. The weird thing is that the request called by plugin has modified url part. It’s almost as should be but where is this hardcoded beginning of path there is “v2” replaced with underscore “_”. I don’t get it what mechanism is responsible for this replacing, but there is difference in response body when there is underscore or v2 and I think this is a reason of my problem with error 502. Did any one encounter similiar problem with unexpected modification of url while using invokeTemplate in fresh service 2.3?

Screens with additional info:

Manifest.json

Requests.json

Example of usage


where templateName was correct,
path = “/569/requested-items”,
body = null

Browser view of request

Please try invoking the same using Postman and also try using our AI assisted app migration feature to migrate

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.