summaryrefslogtreecommitdiff
path: root/engine/AjaxErrorResponse.php
blob: a1fe381d98d8f0f74b2fc4c348391c372407b564 (plain)
1
2
3
4
5
6
7
8
9
<?php

class AjaxErrorResponse extends AjaxResponse {

    public function __construct(string $error, int $code = 200) {
        parent::__construct(code: $code, body: json_encode(['error' => $error], JSON_UNESCAPED_UNICODE));
    }

}