This means the exception need to have string error code, HTTP status code, and a message, as the WP REST API errors look as foolows: {"code":"rest_invalid_json","message":"Invalid JSON body passed.","data":{"status":400,"json_error_code":4,"json_error_message":"Syntax error"}} [MAILPOET-4135]
12 lines
243 B
PHP
12 lines
243 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace MailPoet\Automation\Exceptions;
|
|
|
|
/**
|
|
* USE: When wrong data VALUE is received.
|
|
* API: 400 Bad Request
|
|
*/
|
|
class UnexpectedValueException extends RuntimeException {
|
|
protected $statusCode = 400;
|
|
}
|