update 2023-07-08 15:13:40
This commit is contained in:
parent
7d2702eb8e
commit
0ccbce9994
|
@ -44,7 +44,7 @@ final class Response
|
||||||
// Decode the error response and throw an exception.
|
// Decode the error response and throw an exception.
|
||||||
$message = $this->error($response);
|
$message = $this->error($response);
|
||||||
|
|
||||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ final class Response
|
||||||
// Decode the error response and throw an exception.
|
// Decode the error response and throw an exception.
|
||||||
$message = $this->error($response);
|
$message = $this->error($response);
|
||||||
|
|
||||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,6 +134,10 @@ final class Response
|
||||||
{
|
{
|
||||||
return $error->error;
|
return $error->error;
|
||||||
}
|
}
|
||||||
|
elseif (isset($error->message))
|
||||||
|
{
|
||||||
|
return $error->message;
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
// Decode the error response and throw an exception.
|
// Decode the error response and throw an exception.
|
||||||
$message = $this->error($response);
|
$message = $this->error($response);
|
||||||
|
|
||||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
// Decode the error response and throw an exception.
|
// Decode the error response and throw an exception.
|
||||||
$message = $this->error($response);
|
$message = $this->error($response);
|
||||||
|
|
||||||
throw new \DomainException("Invalid response received from API.$message", $response->code);
|
throw new \DomainException("Invalid response received from API. $message", $response->code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +108,10 @@
|
||||||
{
|
{
|
||||||
return $error->error;
|
return $error->error;
|
||||||
}
|
}
|
||||||
|
elseif (isset($error->message))
|
||||||
|
{
|
||||||
|
return $error->message;
|
||||||
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user