Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
Are there multiple reasons for Azure error: "The specified resource does not exist"?

I have a project with tons of users and their uploaded files. The database has all files available, but around a year ago, when connecting the project to Azure and migrating the files, some files were forgotten in the process. While the code now uploads files automatically to Azure when uploading them to database, trying to delete some older files cause issues.

Currently my code checks Azure deletion first and then decides on deleting the file from the database. When trying to delete a file, that doesn't exist in Azure, I get the error message:

StorageError: The specified resource does not exist.

This means, that the current logic doesn't delete it from the database either. I can always just ignore the error from Azure and delete it regardless, but I don't know what would be the best and safest way to do it.

Easiest would probably be to either delete the file anyways

if (!error) { 
    deleteFile(); 
} else {
    console.log("Azure failed, deleting anyways", error);
    deleteFile();
}

or delete it only, if the error is the one aforementioned.

if (!error) { 
    deleteFile(); 
} else if (error.message === "The specified resource does not exist") {
    console.log("Resource doesn't exist, deleting anyways", error);
    deleteFile();
}

But I don't know enough about the error message. Is there another reason to get the same error message and a possibility to delete a file in a wrong situation? Or are there other reasons this shouldn't be done? I've searched the web using the error message, but found many posts regarding permissions, so could this lead to any security problems?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There are 2 possible reasons when you can get StorageError: The specified resource does not exist.:

  1. Blob does not exist and
  2. Blob container for that blob does not exist.

If you are not able to delete a blob for any other reasons (e.g. incorrect authorization, blob is leased etc.), you will get a different error message.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!