Add custom api error as public method

This allows further specification of
errors as described in http://jsonapi.org/format/#errors