Urgent.News

What's breaking now, across thousands of outlets.

Tech

Storage Object API Returned Malformed Responses While Uploading Resized Images: A Retention Boundary

Treat an upload response as untrusted input. Check the HTTP status, validate the response format, and update the training-artifact record only after those checks pass. For a customer-support system, a malformed response must not become a successful thumbnail write in the database. The design choice that matters is reversibility. A thumbnail can be regenerated from its source image. A retention…

The Storage Object API returned malformed responses when uploading resized images, leading to potential retention issues. To address this, it is crucial to treat the upload response as untrusted input and validate its format before updating the training-artifact record. While a 2xx status code is necessary, it is not sufficient; the response must also match the expected format.

If the body is empty, empty, HTML, or malformed JSON, the request identifier should be recorded, and the database update should be stopped. To prevent a client from parsing an error document as success data, the service should return a non-2xx status. The key to this process lies in the storage contract, which includes the exact request path, method, headers, and byte count.

By comparing these elements, issues can be identified and resolved. In the case of a malformed response, the first clue is to verify the request path, method, headers, and byte count against the contract. The second clue involves inspecting request and response logs using the request identifier, including any proxy or gateway involved.

Lastly, check whether the service returned an error document with a non-2xx status code that was mistakenly parsed as success data. Addressing these clues in a systematic manner will help ensure that the thumbnail is only recorded successfully after two independent checks, thereby maintaining the integrity of the retention policy.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to Answer 'Tell Me About Yourself' in a Scrum Master Interview

How to Answer “Tell Me About Yourself” in a Scrum Master Interview The best way to answer “Tell me about yourself” in a Scrum Master interview is to stop listing your certifications and start telling…

  • Focus on optimizing flow and eliminating systemic blockers rather than managing Jira tickets
  • Bridge technical and business perspectives to convert roadmaps into clear, value-driven sprints
  • Cultivate psychological safety through constructive Sprint Retrospectives and inclusive daily syncs

Part 29: Agent cards in practice

Part 29 · One Agent, Five Platforms An agent card is a CV for an agent. It tells other agents who it is, what it can do, where to reach it and how to prove who's calling.

  • Agent card contains agent's name, description, version and capabilities.
  • Invoice exception agent is read-only, uses Entra agent identity for authentication.
  • Supplier-communication agent drafts reply skill, but doesn't send emails.

Keep CSS scroll snap targets visible below a fixed header

A scroll-snap layout can select the correct section and still feel broken: the section heading lands beneath a fixed header. The snap rule is not necessarily wrong.

  • Use scroll-padding-top to reserve space for fixed header.
  • Maintain scroll-snap-align: start and vertical snapping.
  • Verify heading's top edge is at or below header's bottom edge.

More from Wednesday 18 November →