Problem Detail Enum

There is a list of consts at the top of the HttpErrorHandler which references all of the different problems which we have custom exceptions for.

This is a closed set of related values so we can drop them into an enum and use the status code for each one as a value..nice!

But in addition to that we can get it to help us out with the problem type url by adding a method which will match each problem to its own url where the problem can be researched further. This is gonna be cool 😎

Branch: https://github.com/GaryClarke/php-api-pro/tree/23-problem-detail-enum

Complete and Continue  
Discussion

3 comments