You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to create a new contact with an invalid email I get the following response back
The messagepart contains a string and then a json string. I would have expected just the json so I can strip the actual error out of it
`array:2 [▼
"code" => 400
"message" => """
The response has unexpected status code (400).
Response: {
"errors": [
{
"code": 400,
"message": "email: A valid email is required.",
"details": {
"email": [
"A valid email is required."
]
}
}
],
"error": {
"message": "email: A valid email is required. (`error` is deprecated as of 2.6.0 and will be removed in 3.0. Use the `errors` array instead.)",
"code": 400,
"details": {
"email": [
"A valid email is required."
]
}
}
}
"""
]`
`
private function validate()
{
if (!in_array($this->info['http_code'], array(200, 201))) {
$message = 'The response has unexpected status code ('.$this->info['http_code'].').';
throw new UnexpectedResponseFormatException($this, $message, $this->info['http_code']);
}
if ($this->isHtml()) {
throw new UnexpectedResponseFormatException($this);
}
}
When I try to create a new contact with an invalid email I get the following response back
The messagepart contains a string and then a json string. I would have expected just the json so I can strip the actual error out of it
`array:2 [▼
"code" => 400
"message" => """
The response has unexpected status code (400).
]`
`
private function validate()
{
if (!in_array($this->info['http_code'], array(200, 201))) {
$message = 'The response has unexpected status code ('.$this->info['http_code'].').';
throw new UnexpectedResponseFormatException($this, $message, $this->info['http_code']);
}
`
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: