-
Bug
-
Resolution: Unresolved
-
Medium
-
Severity 2 - Major
-
0
-
Issue Summary
AP.confluence.saveMacro does not throw an error even when saving the macro fails.
The suggested way to handle macro saving is by calling saveMacro first and closeMacroEditor afterward. When following this approach, if saveMacro fails, the macro editor will be closed and all changes made by the user will be lost forever.
Steps to Reproduce
You can reproduce this behavior by simply blocking the placeholder endpoint:
- Open a macro editor, for example, the Aura - Cards
- In the chrome network tab, block */wiki/rest/internal/1.0/macro/placeholder
- In the javascript console, run:
try { window.AP.confluence.saveMacro({}) } catch(e) { console.log("This is never printed...", e) }
# Even though the saveMacro function did not successfully save the macro, no error is thrown, indicating that saving was successful.
Expected Results
saveMacro has an indication if the call has failed. This could be in the form of a promise or callback as a second parameter, or by simply throwing an error.
Actual Results
no error message in try {} catch {} block
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available