code: public function then(callable $success = null, callable $fail = null) {
          if($this->success && is_callable($success)) {
              return $success($this->request, $this->request->getStatusCode());
          } elseif(is_callable($fail)) {
              return $fail($this->error);
          }
      }
docs: If Success or Fail
  @param callable $success
  @param callable $fail