Raises custom errors on failed requests