Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.25k stars 1.93k forks source link

[BUG] The response `The requested URI does not represent any resource on the server.` is not helpful when the blob name is `null` #40926

Open prabinpaudel-mfc opened 4 days ago

prabinpaudel-mfc commented 4 days ago

Describe the bug The response The requested URI does not represent any resource on the server. is not helpful when the blob name is null

Exception or Stack Trace Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: com.azure.storage.blob.models.BlobStorageException: Status code 400, "<?xml version="1.0" encoding="utf-8"?>InvalidUriThe requested URI does not represent any resource on the server.

To Reproduce Pass the blob name as null BlobClient blobClient = blobContainerClient.getBlobClient(null);

Code Snippet BlobClient blobClient = blobContainerClient.getBlobClient(null);

Expected behavior The blob name is null

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

Additional context Add any other context about the problem here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report