Capture sentry error if update page api is called without an id
This commit is contained in:
parent
7786c4215a
commit
c234474b89
|
|
@ -659,6 +659,17 @@ export function* createPageSaga(
|
|||
export function* updatePageSaga(action: ReduxAction<UpdatePageRequest>) {
|
||||
try {
|
||||
const request: UpdatePageRequest = action.payload;
|
||||
|
||||
// Update page *needs* id to be there. We found certain scenarios
|
||||
// where this was not happening and capturing the error to know gather
|
||||
// more info: https://github.com/appsmithorg/appsmith/issues/16435
|
||||
if (!request.id) {
|
||||
Sentry.captureException(
|
||||
new Error("Attempting to update page without page id"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// to be done in backend
|
||||
request.customSlug = request.customSlug?.replaceAll(" ", "-");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user