Map an unknown error to a structured ErrorCode for JSON output. Checks custom error classes, HTTP status codes (Octokit errors), and error message patterns in priority order.
Map an unknown error to a structured ErrorCode for JSON output. Checks custom error classes, HTTP status codes (Octokit errors), and error message patterns in priority order.