When we try to create a story from Agile workbench in JIRA. We send the story priority as 5 to JIRA. If priority is not 5 scale in version of JIRA you are using( May be some customization does for your use case), Then the JIRA responds with the error you have posted.
Since JIRA is customized, there will be changes needed in JIRAIntegration component as well to match that customization as the component is built for default OOTB version of JIRA. Try to trace and figure out what changes are needed as you might have to override some rules from JIRAIntegration to your application and fix the issues there to get this working.
I'm encountering the same issue. I ran the tracer and I can see where in the SetJiraIssueRequest data transform in the Pega-Agile-Work class that I think it's setting the Jira ID to "5" for the priority. It's not clear to me though how we change that to account for the case where the actual Jira Priority has an ID of "10003" (for example) - and not the "5" that is the default out-of-the-box.