Build1 distinct publisher3 min readUpdated
One Lambda returned false instead of throwing, so the Errors metric stayed flat and the Slack alert built on top of it had nothing to report.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
The mismatch here runs one way only. Lambda decides whether an invocation counted as an error, and it decides on the basis of whether the handler threw or returned a value [5]. Whatever sits inside that returned payload is opaque to the decision, including the digits 500 [5]. The application had a vocabulary for failure that its own runtime does not read.
Then count what inherits that verdict. The Errors metric is derived from the invocation status [6], the alarm is derived from Errors, and the Slack message is derived from the alarm [7]. Three consumers downstream of one classification the code never set [1]. None of them malfunctioned. Each faithfully reported what the layer above it said, and the layer above it said the job ran fine.
Worth noting which part looked correct on inspection. The author reports the AWS-side configuration was not particularly complicated [3], and that is the trap: the wiring you can verify by reading it was the wiring that was already right. The defect was in the one place a monitoring change does not normally ask you to look.
The habit that produced it is transfer from HTTP work, where the status code is the channel and a client is on the other end of it [1]. A scheduled job has no such client [10]. The only party asking whether the run succeeded is the execution environment, and the only question it knows how to ask is whether the process terminated in a way it recognises as failure [1]. Replacing the returns with a thrown Error answered that question, which put the invocation into the Errors metric and gave the alarm something to fire on [8].
This is why code review does not catch it. An error log, a returned false, and a returned object containing 500 all read as error handling if you only look at the application [11]. All three are also invisible to the runtime. The reviewable property is not "does this function handle the error" but the one the author ends up at: who needs to observe this failure, and how will they find out [9].
The operational consequence is about test method. A monitoring pipeline that has never carried a real failure has not been tested, it has been assembled. Building the CloudWatch alarm and the Slack integration correctly [3] produced silence, and silence is exactly what the same pipeline emits when everything is healthy. The only way to tell those two states apart is to break the job on purpose and see whether the message arrives. Anyone who has ever inherited a green dashboard on a job that stopped working months ago is looking at some version of this: a failure the code handled, and nobody outside the code ever heard about [9].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The existing batch code's error handling included returning false or returning { status: 500 }, intended to indicate that an error had occurred.
From Lambda's perspective, returning false or { status: 500 } simply means the function returned a value and completed successfully; a returned value containing 500 does not cause Lambda to treat the invocation as a failure.
The author refactored the code to throw new Error(...) on failure, which made the Lambda invocation itself fail, was reflected in the CloudWatch Errors metric, and allowed the alarm to trigger.
In the batch case there was no client waiting for an HTTP response, so what mattered was making the Lambda invocation itself fail rather than returning a value containing 500.
Writing an error log, returning false, and returning a value containing 500 can all appear to be forms of error handling if you only look at the application code.
Web APIs can communicate failure through HTTP status codes, but batch jobs need to terminate in a way that allows the execution environment to recognise that the process has failed.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Single first-person account, no docs or reproduction
Every claim traces to one dev.to post written by the engineer who did the work. The narrative is internally consistent and specific about the mechanism (returned value counted as success, absent from the Errors metric, alarm silent, Slack silent, exception restores the chain), but the cluster contains no AWS documentation, no code or configuration artefact, no screenshots of the metric, and no independent report confirming the platform behaviour.
One disclosed production fix
Adoption evidence amounts to a single disclosed instance: one production Lambda whose handler was refactored to throw so an existing CloudWatch alarm and Slack integration would function. There is no indication of how widely this pattern or anti-pattern occurs across teams, no fleet counts, and no other deployments in the cluster.
Slightly understated relative to the failure mode's reach
The post makes no product, performance, or breakthrough claim; it reports one bug and one fix in restrained terms and generalises only to 'consider who needs to observe this failure'. If anything the framing undersells a failure mode that silences an entire alert chain without any visible error, which is why the value sits marginally negative rather than at zero. It is not more negative because the single-source, undocumented evidence base does not support asserting broad prevalence.
Low: practitioner post-mortem with no commercial ask
The item is a personal engineering write-up on a community publishing platform. It names AWS services as the environment being worked in, promotes no product, tool, employer, or paid offering, and makes no comparative vendor claim. The residual incentive is the ordinary reputational one attached to publishing a tidy lesson-learned narrative, which can smooth over messier details of the original code and diagnosis.
Moderate: coherent mechanism, uncorroborated
Confidence is mid-range. The causal chain described is specific, self-consistent, and matches the shape of a well-defined failure mode, and the author reports both the broken and fixed states of the same system, which raises credibility above a bare assertion. It is capped by having one publisher, one author, no documentation or artefact, no contradicting or corroborating source, and no measurement of scope beyond a single Lambda.
build
Put a threshold and a price next to every "idle" resource, or stop calling it idle1 distinct publisher
build
Bedrock model IDs behind AppConfig flags: the swap gets cheaper, the approval gets thinner1 distinct publisher
build
Three API calls, no rollback: the phone numbers your carrier bills and your database never saw1 distinct publisher
build
DynamoDB vector indexes remove the second datastore, and the GSI permutation trap with it1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 22, 2026