public function error($error, $defaultStatusCode = null, array $headers = [])
    {
        if (is_string($error)) {
            $error = $this->api->getErrors()->error($error);
        } else if (is_array($error)) {
            $error = Error::create($error);
        }

        if (!$error instanceof ErrorInterface) {
            throw new \InvalidArgumentException('Expecting a string, array or error object.');
        }

        return $this->errors($error, $defaultStatusCode, $headers);
    }