macOS Error Codes

Decode OSStatus, Mach and POSIX error codes in one searchable table.

Search macOS error codes across OSStatus (Core Foundation, Security, Carbon), Mach kernel and POSIX errno domains — decode a number or name and get the meaning plus a practical fix hint.

What are the main macOS error domains?

macOS layers several error systems. OSStatus is a signed 32-bit code used by Core Foundation, Security (errSec…), and legacy Carbon APIs. Mach kernel calls return kern_return_t values (KERN_…). And the BSD layer uses the same POSIX errno values as other Unix systems. NSError often wraps one of these under a domain string.

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.