Skip to content

Use HeaderConstants for CRC64 InvalidHeaderValue payload#2676

Closed
jainakanksha-msft with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-code-review-suggestion-2644
Closed

Use HeaderConstants for CRC64 InvalidHeaderValue payload#2676
jainakanksha-msft with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-code-review-suggestion-2644

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This addresses the PR review comment on the CRC64 transactional checksum path. The InvalidHeaderValue details for malformed x-ms-content-crc64 input now use the shared blob header constant instead of an inline string literal.

  • What changed

    • Updated computeAndValidateTransactionalChecksums in src/blob/utils/utils.ts to use HeaderConstants.X_MS_CONTENT_CRC64 when constructing the InvalidHeaderValue payload.
    • Added the corresponding HeaderConstants import from src/blob/utils/constants.ts.
  • Why this matters

    • Keeps header naming aligned with the rest of the blob handlers.
    • Reduces drift/typo risk in error payloads for transactional checksum validation.
  • Code sketch

    throw StorageErrorFactory.getInvalidHeaderValue(contextId, {
      HeaderName: HeaderConstants.X_MS_CONTENT_CRC64,
      HeaderValue: expectedCrc64RawHeader ?? ""
    });

Copilot AI requested review from Copilot and removed request for Copilot July 20, 2026 13:46
Copilot AI changed the title [WIP] Fix code for review comment in pull request 2644 Use HeaderConstants for CRC64 InvalidHeaderValue payload Jul 20, 2026
Copilot AI requested a review from jainakanksha-msft July 20, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants