fine-uploader icon indicating copy to clipboard operation
fine-uploader copied to clipboard

Custom error messages for Azure

Open angelsix opened this issue 11 years ago • 7 comments

Can you add option overrides for the error messages in Azure, for example when the signature returns 403.

Static text is in v5.0.4 at line 6504 and 6513

        getSasFailure = function(reason, getSasXhr) {
            log("GET SAS request failed: " + reason, "error");
            promise.failure({error: "Problem communicating with local server"}, getSasXhr);
        },
        determineBlobUrlSuccess = function(blobUrl) {
            api.getSasForPutBlobOrBlock.request(getSasId, blobUrl).then(
                getSasSuccess,
                getSasFailure
            );
        },
        determineBlobUrlFailure = function(reason) {
            log(qq.format("Failed to determine blob name for ID {} - {}", id, reason), "error");

angelsix avatar Aug 26 '14 18:08 angelsix

:+1: was also looking for this feature.

Another example:

function handleFailure(xhr, promise) {
        var azureError = qq.azure.util.parseAzureError(xhr.responseText, log),
            errorMsg = "Problem sending file to Azure";

        promise.failure({error: errorMsg,
            azureError: azureError && azureError.message,
            reset: xhr.status === 403
        });
    }

Korijn avatar Nov 06 '15 09:11 Korijn

Semi-related question: is this supposed to trigger the callback onError? We're attached a logger and it's not logging anything. :) If not, how do I hook in to this?

Korijn avatar Mar 09 '16 14:03 Korijn

It should triggger onError. But you should also (and more properly) be able to access the status of the request in an onComplete callback. If you are seeing a specific issue, please open up a new case.

rnicholus avatar Mar 09 '16 18:03 rnicholus

Is there any plan to complete this item?

Korijn avatar May 04 '16 11:05 Korijn

There is no specific timeline to complete this. Reasons:

  • Azure is much less popular than S3 or traditional endpoint support. The S3 and traditional/custom endpoint modules of the code are given priority attention
  • I am the only developer allocated to Fine Uploader, and my time to work on this project is unfortunately quite limited as well. I spend most of my time answering questions and providing support.

rnicholus avatar May 04 '16 14:05 rnicholus

No problem, I just wanted to know. :) Thanks for your quick reply. We've been using FineUploader for about a year now for transfers of 250-1000 MB datasets, and it's working out great; we're very content. Not being able to customize an error message is only a minor annoyance. We might open a PR for it ourselves at some point.

Korijn avatar May 04 '16 14:05 Korijn

Thanks for that. I'm working on a plan to get more eyes on Fine Uploader and Modern Uploader.

rnicholus avatar May 04 '16 14:05 rnicholus