How to Type Fetch Success and Error Results in TypeScript
Model fetch success, HTTP, request, and JSON errors in TypeScript with a discriminated union, runtime validation, and safe narrowing.
Accepting new clients
You run the business.
I handle the software.
I'm Samuel Fajreldines, a senior software engineer. Growing U.S. businesses hire my team to become their software department, not a vendor they rehire every quarter. I set the technical direction, my team builds and ships, and I stay accountable for everything that goes out.
Model fetch success, HTTP, request, and JSON errors in TypeScript with a discriminated union, runtime validation, and safe narrowing.
Learn when to fix the process, connect systems, or replace quoting software your sales team avoids, without losing quote history, data, or clear ownership.
Find out why your team re-enters the same order in multiple systems and decide what to fix, connect, or put under clear ownership.
Learn to choose unit or integration tests in Node.js by the behavior and boundary that must stay real, without following a fixed ratio.
Learn to treat external JSON as unknown, validate nested objects, separate parsing from shape checks, and test the TypeScript boundary.