refactor: Improve warnings and error messages to users about sharing (#4687) (no-changelog)

* refactor: Improve warnings and error messages to users about sharing
This commit is contained in:
Omar Ajoue
2022-11-22 13:05:51 +01:00
committed by GitHub
parent 91408dccf5
commit ad6c6f60a1
7 changed files with 33 additions and 24 deletions

View File

@@ -223,7 +223,7 @@ workflowsController.get(
userId: req.user.id,
});
throw new ResponseHelper.ResponseError(
`Workflow with ID "${workflowId}" could not be found.`,
'Could not load the workflow - you can only access workflows owned by you',
undefined,
404,
);
@@ -298,7 +298,7 @@ workflowsController.delete(
userId: req.user.id,
});
throw new ResponseHelper.ResponseError(
`Workflow with ID "${workflowId}" could not be found to be deleted.`,
'Could not delete the workflow - you can only remove workflows owned by you',
undefined,
400,
);