Check error handling

Inspect JavaScript text for four visible error-handling omissions without treating regex matches as proof.

freeworks offlinenothing uploaded
ToolError Handling Checker
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The four patterns cover an empty catch, awaited fetch with no visible ok or status token, a Promise constructor with no reject text, and JSON.parse without a preceding try. It has no syntax tree and cannot connect a status check, catch, or rejection path to the operation it appears beside.

  • Only JavaScript source text is considered.
  • Zero findings is not promoted to a pass because most runtime error paths are outside these patterns.

Worked example

Check error handling
Input
											async function load(){ const response = await fetch(url); return response.json(); }
										
Output
												Issues: fetch resolves on HTTP errors; check response.ok or status.
Issue count: 1
											

When to use this

Fetch wrappers expose missing status checks, ingestion boundaries review JSON parsing, and Promise constructors are checked for a visible rejection path.

Edge cases

  • An unrelated response.ok elsewhere can suppress the fetch warning.
  • The word reject inside a comment can hide the Promise-constructor warning.
  • Promise chains, callback errors, event handlers, and framework error boundaries are not examined.

References