Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1402

async nuxeo-operation doesn't respect the promise contract

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0.6
    • Fix Version/s: None
    • Component/s: Core

      Description

      If an error happens during the processing, the catch block is never executed

      <nuxeo-operation id="publishOp" op="MediaPublish" schemas="*" async></nuxeo-operation>
      
      this.$.publishOp.execute()
                          .then((response) => {
                              this.document = response;
                          }).catch((error) => {
                          console.log(error);
                      }).finally(() => {
                          this.$.progress.disabled = true;
                          this.shadowRoot.querySelector('#action').disabled = false;
                      });
      

      If the call is sucessful, the then block is executed

        Attachments

        1. console.PNG
          11 kB
          Michaël Vachette

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: