Search Results for

    Show / Hide Table of Contents

    UpdateRequestSettings

    interface UpdateRequestSettings extends RequestSettings {
        /** When specified, if the etag of the record on the server doesn't match the etag passed by the client,
            * the server will abort the request. This can be used to ensure the request will not go through if
            * another use made changes to the record. */
        etag?: string;
    }
    

    RequestSettings

    interface RequestSettings {
        /** If true, the request is executed asynchronously. Default: true */
        async?: boolean;
        /** If true and async is false, will return a promise that when resolved synchronously will call then/catch handlers synchronously instead of on the next tick. */
        useNonStandardSyncPromise?: boolean;
        /** Success callback for the request. (Use the Promise instead of asynchronous requests.) */
        success?(data: any): void;
        /** Failure callback for the request. (Use the Promise instead of asynchronous requests.) */
        fail?(error: Error): void;
        /** Callback for the request made in both the case of success and failure. (Use the Promise instead of asynchronous requests.) */
        always?(data: any, error: Error | null): void;
        /** Request timeout in milliseconds */
        timeout?: number;
        /** Add a tag that will be available to plugins via pluginContext.SharedVariables["tag"] */
        tag?: string;
        /** Whether to automatically wait/retry if [Service Protection Limits](https://docs.microsoft.com/en-us/power-apps/developer/data-platform/api-limits) are hit. 
         * This can be defaulted using the autoRetryServiceProtectionErrors setting passed into `Hsl.WebApi.getClient`. */
        autoRetryServiceProtectionErrors?: boolean;
        /** Callback made when a service protection error is hit. 
         * NOTE: this could be called multiple times for the same request. 
         * This setting only works when autoRetryServiceProtectionErrors is set to true. */
        onServiceProtectionError?: (this: undefined, ctx: OnServiceProtectionErrorContext) => void;
    }
    
    interface OnServiceProtectionErrorContext {
        error: WebApiError;
    }
    
    In This Article
    Back to top Hitachi Solutions JS Library