mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Restore 200 OK + response payload for save and delete endpoints (#55535)
This commit is contained in:
parent
e828a12954
commit
d23d8f0afd
2 changed files with 6 additions and 4 deletions
|
@ -24,8 +24,9 @@ export function registerDeleteRoute(deps: RouteDependencies, legacy: ServerShim)
|
|||
const { watchId } = request.params;
|
||||
|
||||
try {
|
||||
await deleteWatch(callWithRequest, watchId);
|
||||
return response.noContent();
|
||||
return response.ok({
|
||||
body: await deleteWatch(callWithRequest, watchId),
|
||||
});
|
||||
} catch (e) {
|
||||
// Case: Error from Elasticsearch JS client
|
||||
if (isEsError(e)) {
|
||||
|
|
|
@ -76,8 +76,9 @@ export function registerSaveRoute(deps: RouteDependencies, legacy: ServerShim) {
|
|||
|
||||
try {
|
||||
// Create new watch
|
||||
await saveWatch(callWithRequest, id, serializedWatch);
|
||||
return response.noContent();
|
||||
return response.ok({
|
||||
body: await saveWatch(callWithRequest, id, serializedWatch),
|
||||
});
|
||||
} catch (e) {
|
||||
// Case: Error from Elasticsearch JS client
|
||||
if (isEsError(e)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue