#191 Map REST exceptions to HTTP status codes
Closed: Fixed None Opened 13 years ago by edewata.

By default if there's an exception the REST service will return a generic HTTP status code 500. These exceptions should be mapped into the proper HTTP status codes if available, for instance if the resource doesn't exist it should return 404.


LDAP exceptions that may need to be mapped include:

  • LDAP_TIMELIMIT_EXCEEDED
  • LDAP_SIZELIMIT_EXCEEDED
  • LDAP_TYPE_OR_VALUE_EXISTS
  • LDAP_NO_SUCH_OBJECT
  • LDAP_ALREADY_EXISTS
  • LDAP_INVALID_DN_SYNTAX

Client errors should be reported as 4xx. Server errors should be reported as 5xx.

This ticket was fixed in patches - 98037df00124e1ab81b6ef3be9ba2133f723a95e , 4faa78799a947b7c06db6835ac25c0954e102c5a. Marking it as resolved fixed.

Metadata Update from @edewata:
- Issue assigned to kaskahn
- Issue set to the milestone: 10.0.2

8 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/762

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Log in to comment on this ticket.

Metadata