Added functionality to wrap HTTP error code responses into formatted responses, updated tests and README