Files
piratepoet/mailpoet/lib/Automation/Exceptions/NotFoundException.php
Jan Jakes 79350b4282 Add basic set of exceptions compatible with WP REST API
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]
2022-02-21 09:56:26 +01:00

12 lines
265 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Automation\Exceptions;
/**
* USE: When the main resource we're interested in doesn't exist.
* API: 404 Not Found
*/
class NotFoundException extends UnexpectedValueException {
protected $statusCode = 404;
}