api must return errors