Perform JDBC Query assertion fails with warning in SSG log. Front end system want this message to be sent in response back to them to show the relevant error message to the user. Presently Gateway Policy return 500 error which does not help front end system.
warning in ssg log:
2023-04-18T07:54:25.975+0100 WARNING 686 com.l7tech.external.assertions.jdbcquery.server.ServerJdbcQueryAssertion: 9104: "Perform JDBC Query" assertion failed due to: Value: Insert disallowed: A correspondence group with this name already exists for this client.
Release : 10.1
you can audit the,
${audit.details.last.fullText}
https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/11-0/reference/context-variables/audit-context-variables.html
Immediately after the JDBC assertion as "last" means it must immediately proceed the assertion you want details on.
If the Audit helps then you can use a context variable set to the value above.
i.e.
Context Variable Name: myFault = ${audit.details.last.fullText}
Then use assertion customize error response to provide ${myFault}