restful error handling
middleware and provider tests