api/util/util: initial commit of InternalError type
api/util/json: wrap error with InternalError in JSONAPIErr, provide better information on internal errors