Treat unsupported API call as HTTP error
This commit is contained in:
parent
11558d0cc5
commit
97642e770b
1 changed files with 2 additions and 3 deletions
|
@ -276,9 +276,8 @@ class ApiResponse extends Response
|
|||
'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '',
|
||||
'request' => $request,
|
||||
]);
|
||||
$error = $this->l10n->t('API endpoint %s %s is not implemented', strtoupper($method), $path);
|
||||
$error_description = $this->l10n->t('The API endpoint is currently not implemented but might be in the future.');
|
||||
$error = $this->l10n->t('API endpoint %s %s is not implemented but might be in the future.', strtoupper($method), $path);
|
||||
|
||||
$this->exit('error', ['error' => ['error' => $error, 'error_description' => $error_description]]);
|
||||
$this->error(501, 'Not Implemented', $error);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue