Decode a macOS error code across all three domains
macOS reports failures through several systems: signed OSStatus codes from
Core Foundation, Security, and Carbon; kern_return_t values from the Mach
kernel; and plain POSIX errno from the BSD layer. A bare number like -25300
or -43 is meaningless until you know which domain it came from. This tool takes
a number or a symbolic name and returns the domain, meaning, and a fix hint.
How it works
The page carries a curated table of common codes, each tagged with its domain
(OSStatus, Mach, or POSIX), the symbolic name, its numeric value, the meaning,
and a hint. Your input is normalised: a 0x prefix is parsed as hexadecimal,
otherwise a signed integer is parsed (so -43 matches fnfErr). Numeric queries
match the stored value exactly. Text queries match the symbolic name and the
meaning case-insensitively, so keychain or not found group related Security
and file errors together.
Tips and notes
OSStatus is signed — include the minus sign when searching classic codes
(-50, -43) and Security codes (errSecItemNotFound, -25300). Apple’s
macerror command-line tool translates many OSStatus values, and Console.app
plus the unified log (log show) surface framework errors with their domain. For
Mach codes, mach_error_string gives text at runtime. The BSD layer uses the same
errno values as any Unix, so a 2 from a low-level call is ENOENT. This table
covers common cases; Apple’s headers (MacErrors.h, SecBase.h, mach/kern_return.h)
are authoritative for the full set.