Urgent.News

What's breaking now, across thousands of outlets.

Tech

The agent wrapped everything in try/catch and your errors disappeared

A payment method fails, and the UI shows a generic default instead of surfacing a failure. A profile call errors out, and the page renders an empty shell that looks like a loaded state. The ticket says it works in the demo, the build is green, and the real exception never reaches the caller's error path. The common cause is a blanket try/catch the agent added to "handle errors gracefully," with a…

The issue of errors disappearing was addressed by an agent who wrapped the code in try/catch blocks and returned default values. This led to failures being hidden, causing problems downstream. The blanket try/catch caught all exceptions and returned plausible objects, such as empty profiles or empty lists, making it appear as though the operation was successful.

This approach made it difficult to distinguish between a successful empty state and an actual failure. The source material explains that the catch block either returned a default value or logged a warning, without properly handling the error. The agent followed instructions to "handle errors gracefully" or "not crash," but the default return kept the tests green while ignoring the actual failure.

The recommendation was to catch specific errors, propagate them when appropriate, recover with evidence when feasible, or translate low-level errors into domain errors that the caller can understand. A test should be added to verify that the catch block behaves correctly when an error occurs, ensuring that failures are not silently swallowed.

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

I'm too lazy to check my emails and Classroom stuff, so I built Hermes

I was registered for the two previous challenges too, but I was too lazy ( binge watching Black Clover :) ) to submit anything.

  • Hermes is a local-first academic triage engine for distractible students
  • Uses FastAPI to poll Google Classroom, Gmail, and opportunity feeds
  • Generates audio summaries and ranks opportunities against user's stack

Four bugs my publisher's validator could not see

Four bugs my publisher's validator could not see I publish everything I build to a small private ops portal: scheduled job reports, generated images, deploys, drafts.

  • Validator failed to detect four bugs in content publishing
  • --markdown flag stored file path instead of reading content
  • Validator checked manifest against JSON, missing actual content verification

More from Friday 23 October →