Skip to content
>devspeak
← glossary
level 2Bugs & Debugging

Edge case

also: edge cases, corner case, corner cases

An unusual situation at the limits of what your app expects, like an empty list, a huge number, or a name with an apostrophe.

a bit more technical

An input or condition at or beyond the boundaries of normal operation: empty values, zero, maximum sizes, special characters, time zone boundaries, or two actions at once. Code that handles the typical path often fails here.

picture it

A restaurant that plans for parties of two to eight. Then a party of one walks in, or thirty. Nothing is wrong with them. The plan just never considered them.

why it matters

Agents tend to build for the typical case. Naming edge cases up front gets them handled, instead of discovered by your users.

what your agent might say
agent
The split-bill feature works, but I found an edge case: splitting $10 three ways gives $3.33 each, leaving a cent unaccounted for. I'll assign the extra cent to the first person.
how you might use it
you → your agent
Before you finish the search feature, list the edge cases you've handled: empty search, no results, very long text, special characters, and emoji.
common mistake

Thinking edge cases are so rare they don't matter. With enough users, a one-in-a-thousand case happens every day.

builds on