How to use the @esri/solution-common.fail function in @esri/solution-common

To help you get started, we’ve selected a few @esri/solution-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / solution.js / packages / group / src / group.ts View on Github external
updateGroup(
                  newItemTemplate,
                  destinationAuthentication,
                  templateDictionary
                ).then(
                  () => {
                    progressTickCallback();
                    resolve(createResponse.group.id);
                  },
                  e => reject(common.fail(e))
                );
              },
              e => reject(common.fail(e))
            );
        } else {
          reject(common.fail());
        }
      },
      e => reject(common.fail(e))
github Esri / solution.js / packages / feature-layer / src / feature-layer.ts View on Github external
common
                    .updateItemExtended(
                      createResponse.serviceItemId,
                      newItemTemplate.item,
                      newItemTemplate.data,
                      requestOptions.authentication
                    )
                    .then(
                      () => resolve(createResponse.serviceItemId),
                      (e: any) => reject(common.fail(e))
                    );
                },
                e => reject(common.fail(e))
              );
          } else {
            reject(common.fail());
          }
        },
        e => reject(common.fail(e))
github Esri / solution.js / packages / simple-types / src / workforce.ts View on Github external
addResults => {
                  if (addResults && addResults.addResults) {
                    resolve(true);
                  } else {
                    reject(
                      common.fail({
                        success: false,
                        message: "Failed to add dispatch record."
                      })
                    );
                  }
                },
                e =>