mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
enh: does not exist return null
Signed-off-by: Christopher Ng <chrng8@gmail.com>
(cherry picked from commit 9bd7ddd074)
This commit is contained in:
parent
8f54e2c5f7
commit
67abe99047
1 changed files with 4 additions and 1 deletions
|
|
@ -68,7 +68,10 @@ class ApiController extends OCSController {
|
|||
];
|
||||
return new JSONResponse($reminderData, Http::STATUS_OK);
|
||||
} catch (DoesNotExistException $e) {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
$reminderData = [
|
||||
'dueDate' => null,
|
||||
];
|
||||
return new JSONResponse($reminderData, Http::STATUS_OK);
|
||||
} catch (Throwable $th) {
|
||||
$this->logger->error($th->getMessage(), ['exception' => $th]);
|
||||
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
|
|
|
|||
Loading…
Reference in a new issue