# How to handle error mechanism for Savable Data Page

**URL:** <https://forums.pega.com/t/how-to-handle-error-mechanism-for-savable-data-page/8177>\
**Category:** General\
**Tags:** data-management, pega-platform\
**Created:** [August 30, 2024, 11:57am UTC](https://forums.pega.com/t/how-to-handle-error-mechanism-for-savable-data-page/8177 "2024-08-30T11:57:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunds2](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gunds2](https://forums.pega.com/u/gunds2)\
**Post date:** [August 30, 2024, 11:57am UTC](https://forums.pega.com/t/how-to-handle-error-mechanism-for-savable-data-page/8177/1 "2024-08-30T11:57:37Z")

</div>

User is entering some details for which we are using Savable Datable to persist.

As part of Save-DataPage method, if we are encountering some intermittent error or exception, we want to retry for 3 more times to make sure it succeeds next time.

How can we achieve this?

Because for the first time of using Save-DataPage method in activity, if there is any exception on the datapage.Can we invoke the same Save-DataPage again?

---

<div class="post-metadata">

**Author:** ![RameshSangili](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rameshsangili/32/23377_2.png) [@RameshSangili](https://forums.pega.com/u/RameshSangili)\
**Post date:** [August 30, 2024, 4:59pm UTC](https://forums.pega.com/t/how-to-handle-error-mechanism-for-savable-data-page/8177/2 "2024-08-30T16:59:46Z")

</div>

@gunds2

Ideally, the StepStatusFail should return an error if there is an issue with Save-DatePage. Iterate three times if there is a success, then exit the iteration.

Can we invoke the same Save-DataPage again? YES

---

<div class="post-metadata">

**Author:** ![gunds2](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gunds2](https://forums.pega.com/u/gunds2)\
**Post date:** [August 31, 2024, 2:45am UTC](https://forums.pega.com/t/how-to-handle-error-mechanism-for-savable-data-page/8177/3 "2024-08-31T02:45:55Z")

</div>

@RameshSangili If there is a failure due to some reason during Save-DataPage method for the first time, we are seeing same error again on the Save-DataPage method irrespective of how many times we try again in the for loop.

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [August 31, 2024, 7:29am UTC](https://forums.pega.com/t/how-to-handle-error-mechanism-for-savable-data-page/8177/4 "2024-08-31T07:29:56Z")

</div>

@gunds2before doing next save, you would need to check if the page has messages using hasmessages when condition, if yes do page-clear-message and then do save.
