Creating an advice to provide a more useful error message - PingAuthorize - 9.1

PingAuthorize

bundle
pingauthorize-91
ft:publication_title
PingAuthorize
Product_Version_ce
PingAuthorize 9.1
category
ContentType
Product
Productdocumentation
paz-91
pingauthorize
ContentType_ce
Product documentation

Add a command, known as an advice, that instructs PingAuthorize to set the HTTP response code and provide a more useful error message when rejecting the outbound response.

Because this problem is due to an attribute of a user (namely their location), use a 4xx response code to indicate a user issue. The 451 response code has been suggested for use in cases where content cannot be displayed for legal reasons.

  1. From the PingAuthorize Policy Editor, go to the Policies tab.
  2. Select Users viewing shared memes.
  3. Click + Advice and Obligations.
  4. Click + Add Advice and select Denied Reason.
  5. For the name, replace Untitled with Send "not permitted" error.
  6. From the Applies to drop-down list, select Deny.
  7. For a Payload value, enter {"status": 451, "message": "Restricted", "detail": "Not permitted per regulation"}.
  8. Click Save changes.
    You have a new advice, which looks something like the following image.

    Screen capture of advice definition