Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

285
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda