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.

Improve error messaging for invalid headers

See original GitHub issue

Library or service name Azure.Storage.Blobs

Description When an InvalidHeaderValue exception is thrown, information as to the header and its invalid value could be included in the exception (apparently it was, in past versions of the SDK). This would assist developers with troubleshooting and would make situations like this less likely to occur.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
InteXXcommented, Aug 24, 2020

Here’s the response:

HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format.
Server: Azurite-Blob/3.7.0
x-ms-error-code: InvalidHeaderValue
x-ms-request-id: 4dd5dd89-fc23-49fb-af73-0c5e10cc9d57
content-type: application/xml
Date: Thu, 20 Aug 2020 15:22:52 GMT
Connection: keep-alive
Transfer-Encoding: chunked

160
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error>
  <Code>InvalidHeaderValue</Code>
  <Message>The value for one of the HTTP headers is not in the correct format.
RequestId:4dd5dd89-fc23-49fb-af73-0c5e10cc9d57
Time:2020-08-20T15:22:52.508Z</Message>
  <HeaderName>x-ms-version</HeaderName>
  <HeaderValue>2019-12-12</HeaderValue>
</Error>
0

Can’t the header name and value be parsed from that?

0reactions
tg-msftcommented, Oct 14, 2020

We do parse those into RequestFailedException.AdditionalInformation today.

I thought that was displayed by default? If it’s not, we should fix that. If it’s not discoverable enough, we should consider post facto client-side validation to make it clearer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Providing a custom error message when HTTP header is ...
Providing a custom error message when HTTP header is invalid (contains whitespace) · java · spring-boot.
Read more >
FIX: Invalid message error if the header field is longer than ...
Fixes an issue that triggers an invalid message error if a message in BizTalk Server has a header field that's more than 1000...
Read more >
Additional Response Header Error Messages
The table below provides information about these responses/error messages, ... The submission contains empty or invalid credentials ( user and password ).
Read more >
How To Fix HTTP Error 431 Request Header Fields Too ...
Learn how to fix the HTTP Error 431 Request Header Fields Too Large message using four simple troubleshooting tips.
Read more >
Data Import error message reference - Analytics Help
Message Meaning So... Empty column header at column number X. The upload file is missing a column header. Ed... Multiple errors occurred: List of multiple...
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