Getting Error 422 | The place for Zendesk users to come together and share
Skip to main content
Question

Getting Error 422

  • June 23, 2022
  • 4 replies
  • 1 view

Benessa

Hello, we have an app that is connecting to Ivanti to create an Incident. The app is not working when I tried running it locally but is working fine on live. I am using the command zcli apps:server to run the app locally. We are also using secure settings on the app.

"parameters": [
      {
          "name": "Ivanti Incident Field ID",
          "type": "text",
          "required": true
      },
      {
          "name": "ivantiIncidentApiDomain",
          "type": "text",
          "required": true
      },
      {
          "name": "ivantiIncidentApiEndpoint",
          "type": "text",
          "required": true
      },
      {
          "name": "mulesoftAPIHeaderClientID",
          "type": "text",
          "required": true,
          "secure": true
      },
      {
          "name": "mulesoftAPIHeaderClientSecret",
          "type": "text",
          "required": true,
          "secure": true
      },
      {
          "name": "token",
          "text": "secure",
          "secure": true
      }
    ]

I tried troubleshooting the error and I found out that it's not going through the 
 client.request(settings).then() function. This is the error that I am getting:
Proxy error: {:code=>"UnprocessableEntity", :status=>"422", :title=>"Unprocessable Entity", :message=>"Failed to get installation and oauth information for app."}

I hope someone can help me.
 
Thank you, Benessa
 

4 replies

Eric27
  • June 23, 2022
Hey Benessa,

Secure settings don't get loaded when testing apps from local. It's called out in the ZCLI limitations
 
Sorry for the inconvenience!

Benessa
  • Author
  • June 24, 2022

Hi Eric, thanks for the prompt response.

Is there a way to run it without using ZCLI? I really need to run it locally because I need to make some changes to the app and test it locally before uploading it to the Zendesk instance.

I hope you can help me with this.

Thank you,
Benessa


Benessa
  • Author
  • June 28, 2022

Hello @eric27, just checking if you've seen my comment above?
I hope you can help to check on it.

Thank you,
Benessa


Eric27
  • June 28, 2022
Hey Benessa,

Unfortunately no matter if you were using ZCLI or ZAT for testing your app locally, you wouldn't be able to test utilizing secure settings. This would cause security issues that would defeat the purpose of secure settings. For local testing you could load the parameters as non-secure which would allow you to utilize it via local. Though this wouldn't be 1:1 as the requests wouldn't be made via our proxy and instead via the Zendesk app.