# Change to Copy Page Hierarchy API exception handling

**URL:** <https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671>\
**Category:** Confluence Cloud Announcements\
**Tags:** rest-api\
**Created:** [June 7, 2021, 3:48pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671 "2021-06-07T15:48:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonKliewer](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/simonkliewer/32/42734_2.png) [@SimonKliewer](https://community.developer.atlassian.com/u/SimonKliewer)\
**Post date:** [June 7, 2021, 3:48pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/1 "2021-06-07T15:48:17Z")

</div>

## What is changing?

Currently, on execution of the Copy Page Hierarchy API endpoint, exceptions are swallowed and the CPH is sometimes re-tried multiple times. With this change, CPH will no longer swallow exceptions and instead fail if an exception is thrown.

On failure, CPH will report this exception to the messages field in the Long Running task response, so the caller can determine the reason for failure.

## Why is it changing?

This change is happening in order to make it easier for the caller of the API to determine the reason for failure.

## What do I need to do?

If you use the Copy Page Hierarchy API, be advised that the endpoint will now fail due to exceptions, and information about these exceptions can be found using the Long Running Tasks API.

## By when do I need to do it?

This change will release to the [Confluence Ecosystem Beta group](https://docs.google.com/forms/d/e/1FAIpQLScx2nBbeydhXVHuywJdl6GMI2uKu3kJG3EZGwhqiSU1FR6OMw/viewform) on June 7th, 2021, and start rolling out in increments to production during June 14-22nd, 2021. (changed to June 21-29th, see below [comment](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/5))

[June 10 Update: Rollout has been postponed, see below [comment](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/4)]  
[June 17 Update: Rollout has been unblocked, see below [comment](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/5)]

---

<div class="post-metadata">

**Author:** ![BobBergman](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/bobbergman/32/38962_2.png) [@BobBergman](https://community.developer.atlassian.com/u/BobBergman)\
**Post date:** [June 7, 2021, 8:19pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/2 "2021-06-07T20:19:53Z")

</div>

This is great news – it’s something we have been asking for for years.

That said, can you provide details on a simple method(s) to cause an error that will be surfaced in this way so that we can test effectively in advance of it hitting production?

---

<div class="post-metadata">

**Author:** ![SimonKliewer](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/simonkliewer/32/42734_2.png) [@SimonKliewer](https://community.developer.atlassian.com/u/SimonKliewer)\
**Post date:** [June 10, 2021, 5:25pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/3 "2021-06-10T17:25:39Z")

</div>

Hi Bob, I am happy to hear! Unfortunately, all known issues that should cause CPH to fail with an error during execution + add add this error to LRT will be resolved by the time this change rolls out. There is no known way to force an issue using the API. (if you do find one, please let us know so we can resolve it!)

There is one known issue right now that happens with this change, and it was brought up [here](https://community.developer.atlassian.com/t/copy-page-hierarchy-api-nullpointerexception-with-new-emoji-titles-page-header-images/48733). However, our team is now working to resolve this issue before we roll this change out. You will be able to follow the progress for that fix with this ticket [here](https://jira.atlassian.com/browse/CONFCLOUD-72284). Please let me know if I can answer anything else!

---

<div class="post-metadata">

**Author:** ![SimonKliewer](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/simonkliewer/32/42734_2.png) [@SimonKliewer](https://community.developer.atlassian.com/u/SimonKliewer)\
**Post date:** [June 10, 2021, 5:26pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/4 "2021-06-10T17:26:54Z")

</div>

The rollout of this change has been postponed. This change is blocked by CONFCLOUD-72284 [here](https://jira.atlassian.com/browse/CONFCLOUD-72284). Once the above is resolved, this change will be rolled out.

---

<div class="post-metadata">

**Author:** ![SimonKliewer](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/simonkliewer/32/42734_2.png) [@SimonKliewer](https://community.developer.atlassian.com/u/SimonKliewer)\
**Post date:** [June 17, 2021, 5:01pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/5 "2021-06-17T17:01:19Z")

</div>

CONFCLOUD-72284 ([reference](https://jira.atlassian.com/browse/CONFCLOUD-72284)) has been resolved. This change will now starting rolling out in increments to production during June 21-29th, 2021.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/atlassiandeveloper/original/3X/7/8/78672baa5ba80cd9164376457051d0eec038b082.png) [@system](https://community.developer.atlassian.com/u/system)\
**Post date:** [July 17, 2021, 5:02pm UTC](https://community.developer.atlassian.com/t/change-to-copy-page-hierarchy-api-exception-handling/48671/6 "2021-07-17T17:02:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
