question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Uncaught (in promise): RestError: Failed to send request

See original GitHub issue

Hi

PackageName: @azure/storage-blob Version : 12.2.1 Node: v14.4.0 OS : Windows

Here is my code for upload files to Blob:

 public uploadFilesToAzureBlob(sasToken: string, file: any, id: string): Observable<any> {
    const blobServiceClient = new BlobServiceClient(sasToken);
    const containerClient = blobServiceClient.getContainerClient(id);

    if (!containerClient.exists()) {
      containerClient.create();
    }

    const client = containerClient.getBlockBlobClient(file.name);

    // 10MB block size and 20 concurrency
    const response = client.uploadBrowserData(file, {
      blockSize: 10485760,
      concurrency: 20,
      blobHTTPHeaders: {
        blobContentType: file.type
      }
    });

    return from(response)
      .pipe(map((res: any) => res),
        catchError(this.handleError));   }                                                                                                                                                      

Getting below errors after 5-10 seconds of uploading the files, though file/s is/are successfully uploaded…

Any suggestion?

Error # 1 ERROR Error: Uncaught (in promise): RestError: Failed to send request to https://AzureBlobStorage/Files/FBEB2AE9-B14C-4C78-8F4A-0CE4FF9DF6F5/EDB62F71-6D1C-4347-B277-0D0BF98B9A1E?sv=2017-04-17&sr=c&sig=AnlnrIFDingda21arBI1mbA0yu2mqtAYehDEWNB5tA4%3D&se=2020-09-19T08%3A07%3A49Z&sp=rwdl&restype=container&_=9311731167285 RestError: Failed to send request to https://AzureBlobStorage/Files/FBEB2AE9-B14C-4C78-8F4A-0CE4FF9DF6F5/EDB62F71-6D1C-4347-B277-0D0BF98B9A1E?sv=2017-04-17&sr=c&sig=AnlnrIFDingda21arBI1mbA0yu2mqtAYehDEWNB5tA4%3D&se=2020-09-19T08%3A07%3A49Z&sp=rwdl&restype=container&_=9311731167285 at new RestError (restError.js:10) at XMLHttpRequest.<anonymous> (xhrHttpClient.js:142) at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Object.onInvokeTask (core.js:41344) at ZoneDelegate.invokeTask (zone-evergreen.js:398) at Zone.runTask (zone-evergreen.js:167) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480) at invokeTask (zone-evergreen.js:1621) at XMLHttpRequest.globalZoneAwareCallback (zone-evergreen.js:1647) at resolvePromise (zone-evergreen.js:798) at zone-evergreen.js:705 at rejected (tslib.es6.js:72) at ZoneDelegate.invoke (zone-evergreen.js:364) at Object.onInvoke (core.js:41366) at ZoneDelegate.invoke (zone-evergreen.js:363) at Zone.run (zone-evergreen.js:123) at zone-evergreen.js:857 at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Object.onInvokeTask (core.js:41344)

Error # 2 GET https://<AzureBlobStorage>/Files/FBEB2AE9-B14C-4C78-8F4A-0CE4FF9DF6F5/EDB62F71-6D1C-4347-B277-0D0BF98B9A1E?sv=2017-04-17&sr=c&sig=AnlnrIFDingda21arBI1mbA0yu2mqtAYehDEWNB5tA4%3D&se=2020-09-19T08%3A07%3A49Z&sp=rwdl&restype=container&_=9311731167285 net::ERR_FAILED

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
XiaoningLiucommented, Sep 23, 2020

Hi, these errors are from network layer, usually caused by network spike. Please double check uploaded data integrity, although blob is created. Recommend to increase max retry count in client options if you want to deal with some bad network situations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RestError: Failed to send request after file uploaded to Blob ...
Getting below errors after 5-10 seconds of uploading the files, though file/s is/are successfully uploaded... Any suggestion? Error # 1. ERROR ...
Read more >
RestError class - Microsoft Learn
An error resulting from an HTTP request to a service endpoint.
Read more >
RestError | @azure/storage-blob - NET
Constructors. constructor. new RestError(message: string, code?: undefined | string, statusCode?: undefined | number, request?: WebResource, response?:
Read more >
Error handling with sync—ArcGIS REST APIs
A REST request issued to ArcGIS Server returns an HTTP status. ... The error includes a REST error code and information on why...
Read more >
sitemap-questions-0.xml - Salesforce Stack Exchange
... -i-load-the-developer-console-i-get-a-total-requests-limit-exceeded-error ... .com/questions/54600/ant-migration-tool-failed-to-send-request 2020-11-18 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found