How to know if AP.confluence.getContentProperty has failed?

Hi, is there a way to detect getContentProperty failure? I am using getContentProperty inside a Promise and I want to reject the Promise when getContentProperty fails.

const customFunction = () => new Promise((resolve, reject) => {
  AP.confluence.getContentProperty(key, contentProperty => {
    // other things

setContentProperty has result.error to indicate failure but there is no equivalent for getContentProperty

Hi @BrigitteLeong,

Some JavaScript APIs support promises where you can add .catch() to handle errors, but is seems AP.confluence operations don’t support promises. I’ve created to request this.



Thanks @dmorrow.