# KnowYourError.com > Copy-paste fixes for error codes across Postgres, Prisma, Stripe, Cloudflare, AWS, EVM/Solidity, Node.js, Next.js, HTTP, SMTP and the OpenAI, Anthropic and Gemini APIs. Every error page is a runbook: Identify, Fix, Verify, Prevent. All error pages, fixes, guides and comparisons are free and public. 101 pages are live across 13 ecosystems; the full-text export for models is at https://knowyourerror.com/llms-full.txt. ## Tools - [Stack trace decoder](https://knowyourerror.com/tools/stack-trace-decoder/): Paste a stack trace or JSON error. Secrets are scrubbed in the browser, known errors resolve instantly, unknown ones get an AI diagnosis. - [EVM error selector lookup](https://knowyourerror.com/tools/evm-error-selector-lookup/): Decode 4-byte selectors and revert data into Solidity custom errors and panic codes, without an ABI. - [Compare errors](https://knowyourerror.com/compare/): Side-by-side verdicts for the codes people confuse (401 vs 403, 502 vs 504, Postgres 53300 vs Prisma P2024). - [API docs](https://knowyourerror.com/api-docs/): The Pro lookup API (GET /api/v1/lookup) for CLIs, CI and agents. ## Guides - [Three 429s, three meanings: OpenAI, Anthropic and Gemini](https://knowyourerror.com/guides/three-429s-ai-providers/): The same status code means “slow down” at one provider and “pay your bill” at another. Here is how to tell them apart in one catch block. - [P2024 on serverless: the connection-pool math nobody does](https://knowyourerror.com/guides/prisma-p2024-serverless-connection-pool-math/): Every cold start opens its own pool. Here is how 40 Lambdas turn into 200 Postgres connections, and the three settings that bring it back to 40. - [Retry or fix? A decision tree for every error in your logs](https://knowyourerror.com/guides/retry-or-fix-decision-tree/): Half of all retry loops make incidents worse. Four questions decide whether to back off and try again, or stop and change the request. - [Reading revert data like a stack trace](https://knowyourerror.com/guides/decode-evm-revert-data/): 0xe450d38c followed by 192 hex characters is not noise. It is a function call in reverse, and you can decode it in one line. - [Cloudflare 52x errors, explained by where the request died](https://knowyourerror.com/guides/cloudflare-52x-where-the-request-died/): 520, 522, 524 and 525 each name a different hop between the edge and your origin. Draw the path once and the fix is obvious. - [401 or 403? Ask one question](https://knowyourerror.com/guides/401-vs-403-one-question/): “Do I know who you are?” If no, 401. If yes but you can’t do this, 403. Everything else is detail. - [Make 550 5.7.1 go away: SPF, DKIM and DMARC in 20 minutes](https://knowyourerror.com/guides/smtp-550-spf-dkim-dmarc-in-20-minutes/): Since 2024 Gmail and Yahoo reject unauthenticated bulk mail outright. Three DNS records fix most of it. - [Next.js hydration errors: the five causes, ranked](https://knowyourerror.com/guides/nextjs-hydration-errors-five-causes/): Dates, window checks, invalid HTML nesting, random IDs and browser extensions. In that order. - [ERR_REQUIRE_ESM in 2026: you might just need to upgrade Node](https://knowyourerror.com/guides/err-require-esm-in-2026/): require() of ES modules works by default since Node 22.12 and 20.19. When it still fails, it is one of two edge cases. - [Postgres deadlocks are retryable. Lock ordering makes them rare.](https://knowyourerror.com/guides/postgres-deadlocks-are-retryable/): 40P01 is Postgres doing its job: it picked a victim so the other transaction could finish. Retry the victim, then fix the order. ## PostgreSQL errors - [All PostgreSQL errors](https://knowyourerror.com/postgres/): SQLSTATE codes raised by the PostgreSQL server: constraint violations, connection limits, lock conflicts and syntax/permission errors. - [PostgreSQL 42P01: Undefined table](https://knowyourerror.com/postgres/42p01-undefined-table/): The query references a table or view that does not exist in any schema on the current search_path. Run your migrations, or schema-qualify the name and match its exact case. - [PostgreSQL 23505: Unique violation](https://knowyourerror.com/postgres/23505-unique-violation/): An INSERT or UPDATE produced a value that already exists in a column covered by a UNIQUE constraint or index. Use INSERT ... ON CONFLICT, or return 409 to the client. - [PostgreSQL 53300: Too many connections](https://knowyourerror.com/postgres/53300-too-many-connections/): Every slot in max_connections is in use, so Postgres refuses new sessions. Put a pooler (PgBouncer, Supavisor, Neon pooled endpoint) in front and cap each app instance's pool size. - [PostgreSQL 40P01: Deadlock detected](https://knowyourerror.com/postgres/40p01-deadlock-detected/): Two transactions each hold a row lock the other needs, so Postgres aborted one after deadlock_timeout (1s). Lock rows in a consistent order and retry the aborted transaction. - [PostgreSQL 08006: Connection failure](https://knowyourerror.com/postgres/08006-connection-failure/): The TCP connection to Postgres dropped mid-session (failover, restart, idle timeout at a proxy). Reconnect with backoff and set keepalives so pooled connections are validated. - [PostgreSQL 42703: Undefined column](https://knowyourerror.com/postgres/42703-undefined-column/): The column name does not exist on that relation. Usually a camelCase column created with quotes; reference it as "createdAt" or rename it to snake_case. - [PostgreSQL 57014: Query canceled](https://knowyourerror.com/postgres/57014-query-canceled/): The statement ran longer than statement_timeout, or was cancelled with pg_cancel_backend(). Add an index or raise the timeout for that one query with SET LOCAL statement_timeout. - [PostgreSQL 22P02: Invalid text representation](https://knowyourerror.com/postgres/22p02-invalid-text-representation/): A string could not be cast to the column type (uuid, integer, boolean, enum). Validate route params before querying; "undefined" usually means a missing JS variable. - [PostgreSQL 23503: Foreign key violation](https://knowyourerror.com/postgres/23503-foreign-key-violation/): The referenced parent row does not exist, or you deleted a parent that still has children. Insert parents first, or declare ON DELETE CASCADE / SET NULL. ## Prisma ORM errors - [All Prisma ORM errors](https://knowyourerror.com/prisma/): Prisma Client, Migrate and Accelerate error codes (P1xxx–P6xxx) thrown as PrismaClientKnownRequestError and friends. - [Prisma ORM P2002: Unique constraint failed](https://knowyourerror.com/prisma/p2002-unique-constraint-failed/): Prisma tried to write a value that already exists in a @unique or @@unique field (Postgres 23505 underneath). Catch P2002 and return 409, or use upsert. - [Prisma ORM P2024: Connection pool timeout](https://knowyourerror.com/prisma/p2024-connection-pool-timeout/): All connections in Prisma's pool were busy for longer than pool_timeout (default 10s). Reuse one PrismaClient, size connection_limit for your platform, and use a pooler for serverless. - [Prisma ORM P1001: Can't reach database server](https://knowyourerror.com/prisma/p1001-cant-reach-database-server/): Prisma could not open a TCP connection to the host and port in DATABASE_URL. Check the host, port, firewall/IP allowlist and whether the database is paused or still booting. - [Prisma ORM P2025: Record not found](https://knowyourerror.com/prisma/p2025-record-not-found/): update, delete, findUniqueOrThrow or a nested connect targeted a row that does not exist. Map P2025 to 404, or use updateMany/deleteMany when a missing row is acceptable. - [Prisma ORM P1000: Authentication failed](https://knowyourerror.com/prisma/p1000-authentication-failed/): The server rejected the user/password in DATABASE_URL. URL-encode special characters in the password (@ → %40, # → %23) and confirm the role exists. - [Prisma ORM P2003: Foreign key constraint failed](https://knowyourerror.com/prisma/p2003-foreign-key-constraint-failed/): The referenced parent row does not exist, or a delete would orphan children. Create the parent first or set onDelete: Cascade on the relation. - [Prisma ORM P2021: Table does not exist](https://knowyourerror.com/prisma/p2021-table-does-not-exist/): The schema has a model whose table was never created in this database. Run prisma migrate deploy (or db push in prototypes) against the same DATABASE_URL. - [Prisma ORM P3009: Failed migrations found](https://knowyourerror.com/prisma/p3009-failed-migrations/): A previous migrate deploy failed halfway and is recorded as failed in _prisma_migrations. Fix the DB state, then run prisma migrate resolve --rolled-back (or --applied) with the migration name. - [Prisma ORM P6004: Accelerate query timeout](https://knowyourerror.com/prisma/p6004-accelerate-query-timeout/): A query through Prisma Accelerate exceeded the global query timeout. Add indexes, paginate large reads, or raise the limit in the Accelerate project settings. ## Stripe errors - [All Stripe errors](https://knowyourerror.com/stripe/): Stripe API error codes, card decline codes and webhook verification failures returned by api.stripe.com and the official SDKs. - [Stripe insufficient_funds: Insufficient funds](https://knowyourerror.com/stripe/insufficient-funds/): The issuer declined because the account lacks available balance or credit. Show the customer a clear message and ask for another payment method; do not auto-retry the same card immediately. - [Stripe generic_decline: Generic decline (card_declined)](https://knowyourerror.com/stripe/generic-decline/): The issuer declined without giving Stripe a reason. Ask the customer to contact their bank or use another card; check Radar if many cards decline at once. - [Stripe StripeSignatureVerificationError: Webhook signature verification failed](https://knowyourerror.com/stripe/webhook-signature-verification-failed/): The HMAC of the body you passed does not match the Stripe-Signature header. Pass the raw, unparsed request body and the whsec_ secret of this exact endpoint. - [Stripe rate_limit: Rate limit exceeded](https://knowyourerror.com/stripe/rate-limit/): You exceeded Stripe's per-account request rate (by default 100 ops/s in live mode, 25 in test mode). Retry with exponential backoff and stop polling — use webhooks and list pagination instead. - [Stripe expired_card: Expired card](https://knowyourerror.com/stripe/expired-card/): The card's expiry date has passed. Ask for a new card; for subscriptions, Stripe's card account updater refreshes many cards automatically. - [Stripe incorrect_cvc: Incorrect CVC](https://knowyourerror.com/stripe/incorrect-cvc/): The issuer rejected the security code. Let the customer re-enter it; test with card 4000 0000 0000 0127. - [Stripe authentication_required: Authentication required (3DS)](https://knowyourerror.com/stripe/authentication-required/): The issuer requires 3D Secure (SCA) but the payment was confirmed off-session. Bring the customer back on-session and confirm with stripe.confirmCardPayment / confirmPayment. - [Stripe resource_missing: No such resource](https://knowyourerror.com/stripe/resource-missing/): The ID does not exist in this account and mode. Usually a test-mode ID used with a live key, or an object on a Connect account requested without the Stripe-Account header. ## Cloudflare errors - [All Cloudflare errors](https://knowyourerror.com/cloudflare/): Cloudflare edge errors: 1xxx access/configuration errors and 52x origin connectivity and TLS failures. - [Cloudflare 1015: You are being rate limited](https://knowyourerror.com/cloudflare/error-1015-you-are-being-rate-limited/): A Cloudflare rate limiting rule on the site matched your IP or key and is blocking you for the mitigation period. As a client, back off per Retry-After; as the owner, loosen or scope the rule. - [Cloudflare 524: A timeout occurred](https://knowyourerror.com/cloudflare/error-524-a-timeout-occurred/): The origin accepted the connection but sent no HTTP response within 100 seconds. Move long jobs to a background queue and return 202, or use a grey-clouded subdomain for long requests. - [Cloudflare 522: Connection timed out](https://knowyourerror.com/cloudflare/error-522-connection-timed-out/): Cloudflare could not complete a TCP handshake with your origin within ~19 seconds. Allow Cloudflare IP ranges in your firewall, check the origin IP in DNS, and confirm the server listens on 0.0.0.0:443/80. - [Cloudflare 525: SSL handshake failed](https://knowyourerror.com/cloudflare/error-525-ssl-handshake-failed/): Cloudflare reached your origin on 443 but the TLS handshake failed (SSL mode Full or Full (strict)). Serve a certificate for the hostname on port 443 with SNI and TLS 1.2+, or install a Cloudflare Origin CA cert. - [Cloudflare 1020: Access denied](https://knowyourerror.com/cloudflare/error-1020-access-denied/): A WAF custom rule (firewall rule) blocked the request. Owners: find the rule by Ray ID in Security > Events; visitors: contact the site with the Ray ID. - [Cloudflare 1016: Origin DNS error](https://knowyourerror.com/cloudflare/error-1016-origin-dns-error/): Cloudflare cannot resolve the origin hostname, usually a proxied CNAME pointing at a deleted or misspelled target. Fix the DNS record or point it at a resolvable host. - [Cloudflare 520: Web server returned an unknown error](https://knowyourerror.com/cloudflare/error-520-web-server-returned-unknown-error/): The origin returned an empty, invalid or reset response (crash, oversized headers > 128 KB, connection reset). Check origin error logs at the Ray ID timestamp. - [Cloudflare 521: Web server is down](https://knowyourerror.com/cloudflare/error-521-web-server-is-down/): The origin actively refused the connection (TCP RST): the web server is stopped or a firewall rejects Cloudflare IPs. Start the service and allow Cloudflare ranges. - [Cloudflare 526: Invalid SSL certificate](https://knowyourerror.com/cloudflare/error-526-invalid-ssl-certificate/): In Full (strict) mode the origin certificate is expired, self-signed or does not cover the hostname. Renew it or install a Cloudflare Origin CA certificate. ## HTTP Status Codes errors - [All HTTP Status Codes errors](https://knowyourerror.com/http/): IANA-registered HTTP status codes as seen by API clients, proxies and load balancers. - [HTTP Status Codes 401: Unauthorized](https://knowyourerror.com/http/401-unauthorized/): The request has no valid credentials: the token is missing, malformed or expired. Send Authorization: Bearer , and refresh the token on 401 before retrying once. - [HTTP Status Codes 403: Forbidden](https://knowyourerror.com/http/403-forbidden/): The server knows who you are but refuses the action: missing role, scope, IP allowlist or WAF block. Re-authenticating will not help; grant the permission or change the request. - [HTTP Status Codes 429: Too Many Requests](https://knowyourerror.com/http/429-too-many-requests/): The client sent more requests than the server's rate limit allows in the window. Wait Retry-After seconds, then retry with exponential backoff and jitter. - [HTTP Status Codes 502: Bad Gateway](https://knowyourerror.com/http/502-bad-gateway/): A proxy or load balancer got an invalid or no response from the upstream app (refused, reset, crashed). Check that the upstream is running on the expected host:port and that its keep-alive timeout exceeds the proxy's. - [HTTP Status Codes 504: Gateway Timeout](https://knowyourerror.com/http/504-gateway-timeout/): The proxy waited longer than its timeout (nginx 60s, ALB 60s idle, API Gateway 29s) without a response from the upstream. Speed up the handler or make it async and return 202. - [HTTP Status Codes 400: Bad Request](https://knowyourerror.com/http/400-bad-request/): The server could not parse the request: malformed JSON, wrong Content-Type, or invalid query syntax. Validate the body and send Content-Type: application/json. - [HTTP Status Codes 404: Not Found](https://knowyourerror.com/http/404-not-found/): No resource or route matches the URL. Check the path (plural vs singular, trailing slash, API version prefix) and that the id exists. - [HTTP Status Codes 409: Conflict](https://knowyourerror.com/http/409-conflict/): The request conflicts with current state: duplicate unique value or a stale version (optimistic locking). Re-fetch the resource and resolve the conflict before retrying. - [HTTP Status Codes 422: Unprocessable Content](https://knowyourerror.com/http/422-unprocessable-content/): The body is well-formed but fails validation (missing field, wrong type, business rule). Read the field errors in the response and fix the payload. - [HTTP Status Codes 500: Internal Server Error](https://knowyourerror.com/http/500-internal-server-error/): An unhandled exception in the server. Look up the request id in server logs or your error tracker; the client cannot fix it. - [HTTP Status Codes 503: Service Unavailable](https://knowyourerror.com/http/503-service-unavailable/): The server or load balancer has no healthy capacity (overload, maintenance, zero healthy targets). Retry after Retry-After; check health checks and autoscaling. ## SMTP errors - [All SMTP errors](https://knowyourerror.com/smtp/): SMTP reply codes and RFC 3463 enhanced status codes returned by Gmail, Microsoft 365 and other MTAs. - [SMTP 550 5.7.26: Sender is unauthenticated](https://knowyourerror.com/smtp/550-5-7-26-unauthenticated-sender/): Gmail rejected mail that passed neither SPF nor DKIM. Publish SPF for your sending IPs and sign with DKIM; bulk senders also need DMARC. - [SMTP 550 5.7.1: Unauthenticated email rejected](https://knowyourerror.com/smtp/550-5-7-1-unauthenticated-email/): The receiving server rejected the message because it failed SPF/DKIM alignment and the From domain's DMARC policy is p=reject. Sign with DKIM for the From domain and include your sender in SPF. - [SMTP 550 5.1.1: Recipient address rejected: user unknown](https://knowyourerror.com/smtp/550-5-1-1-user-unknown/): The mailbox does not exist at the destination domain — a hard bounce. Stop sending to that address and add it to your suppression list; retrying hurts sender reputation. - [SMTP 421 4.7.0: Temporary system problem, try again later](https://knowyourerror.com/smtp/421-4-7-0-try-again-later/): The receiver temporarily deferred your connection for security or reputation reasons (also used for missing TLS or PTR). Your MTA should retry; fix PTR/rDNS and sending volume if it persists. - [SMTP 452 4.2.2: Mailbox full](https://knowyourerror.com/smtp/452-4-2-2-mailbox-full/): The recipient's mailbox is over quota. Soft bounce: retry later, and suppress the address if it keeps bouncing for several days. - [SMTP 535 5.7.8: Authentication credentials invalid](https://knowyourerror.com/smtp/535-5-7-8-authentication-credentials-invalid/): SMTP AUTH failed. For Gmail/Workspace use an App Password (2FA required); for ESPs use the SMTP-specific credentials, not your dashboard password. - [SMTP 554 5.7.1: Relay access denied](https://knowyourerror.com/smtp/554-5-7-1-relay-access-denied/): Postfix refused to relay to an external domain because the client did not authenticate. Connect on 587 with STARTTLS and SMTP AUTH, or add the client network to mynetworks. - [SMTP 421 4.7.28: Rate limited: unusual rate of unsolicited mail](https://knowyourerror.com/smtp/421-4-7-28-rate-limited-unsolicited/): Gmail throttles your domain or IP because of spam complaints or a sudden volume spike. Slow down, warm up new IPs gradually and keep the spam rate below 0.3% in Postmaster Tools. ## AWS errors - [All AWS errors](https://knowyourerror.com/aws/): AWS service error codes returned by the SDKs and CLI, generated from botocore service models. - [AWS AccessDenied: S3 Access Denied](https://knowyourerror.com/aws/s3-accessdenied/): The caller's IAM policy, the bucket policy, a KMS key policy or Block Public Access denied the S3 action. Grant the action on the right ARN (bucket vs bucket/*) and check explicit Deny statements. - [AWS NoSuchKey: S3 NoSuchKey](https://knowyourerror.com/aws/s3-nosuchkey/): No object exists at that exact key in the bucket. Check for a leading slash, URL-encoded characters and case, and handle NoSuchKey as a 404 in code. - [AWS TooManyRequestsException: Lambda Rate Exceeded (throttled)](https://knowyourerror.com/aws/lambda-toomanyrequestsexception/): Lambda throttled the invoke because the function's reserved concurrency or the account's regional concurrency limit (default 1,000) is used up. Raise reserved concurrency or the quota, and retry with backoff. - [AWS ExpiredToken: Security token expired](https://knowyourerror.com/aws/sts-expiredtoken/): The temporary credentials (AWS_SESSION_TOKEN from SSO, AssumeRole or MFA) passed their expiration. Re-authenticate with aws sso login, or use a credential provider that refreshes automatically. - [AWS SlowDown: S3 SlowDown](https://knowyourerror.com/aws/s3-slowdown/): You exceeded S3's per-prefix request rate (3,500 writes / 5,500 reads per second per prefix). Spread keys across more prefixes and retry with backoff. - [AWS NoSuchBucket: S3 NoSuchBucket](https://knowyourerror.com/aws/s3-nosuchbucket/): The bucket name is wrong, was deleted, or you are using a custom endpoint (MinIO, R2) without setting endpoint and forcePathStyle. Check the name and endpoint configuration. - [AWS InvalidClientTokenId: Invalid client token id](https://knowyourerror.com/aws/sts-invalidclienttokenid/): The access key id is unknown, deactivated, or temporary credentials are sent without their session token (or to a Region not enabled for the account). Rotate keys and check which profile is active. - [AWS ResourceNotFoundException: Lambda function not found](https://knowyourerror.com/aws/lambda-resourcenotfoundexception/): The function, alias or version does not exist in that Region/account. Check AWS_REGION, the alias name and that the deploy finished. - [AWS AccessDeniedException: Access denied (JSON-protocol services)](https://knowyourerror.com/aws/accessdeniedexception/): IAM denied the action for this principal (Secrets Manager, DynamoDB, KMS, Lambda and other JSON-protocol services use this name). Add the exact action and resource ARN to the role policy. ## EVM / Solidity errors - [All EVM / Solidity errors](https://knowyourerror.com/evm/): 4-byte revert selectors: Solidity built-ins, Panic codes and OpenZeppelin v5 custom errors, decoded. - [EVM / Solidity 0x08c379a0: Error(string) revert](https://knowyourerror.com/evm/0x08c379a0-error-string-revert/): 0x08c379a0 is the selector of Error(string), emitted by require(cond, "msg") and revert("msg"). ABI-decode the rest of the data to read the reason string; fix the failing condition. - [EVM / Solidity 0x4e487b71: Panic(0x11): arithmetic overflow/underflow](https://knowyourerror.com/evm/0x4e487b71-panic-arithmetic-overflow/): 0x4e487b71 is Panic(uint256); code 0x11 means checked arithmetic over- or underflowed (Solidity ≥0.8). Usually a subtraction where b > a. Validate inputs and revert with a custom error first. - [EVM / Solidity 0xe450d38c: ERC20InsufficientBalance](https://knowyourerror.com/evm/0xe450d38c-erc20-insufficient-balance/): An OpenZeppelin v5 ERC-20 transfer or burn needed more tokens than the sender holds. The data decodes to (sender, balance, needed); top up the balance or lower the amount, minding decimals. - [EVM / Solidity 0x118cdaa7: OwnableUnauthorizedAccount](https://knowyourerror.com/evm/0x118cdaa7-ownable-unauthorized-account/): An onlyOwner function was called by an address that is not owner(). The data contains the caller; send from the owner account, or transfer ownership — and remember v5 requires an initialOwner in the constructor. - [EVM / Solidity 0xfb8f41b2: ERC20InsufficientAllowance](https://knowyourerror.com/evm/0xfb8f41b2-erc20-insufficient-allowance/): transferFrom was called by a spender whose allowance is lower than the amount. The data decodes to (spender, allowance, needed); call approve(spender, amount) from the token owner first. - [EVM / Solidity 0x7e273289: ERC721NonexistentToken](https://knowyourerror.com/evm/0x7e273289-erc721-nonexistent-token/): The tokenId was never minted or has been burned (OpenZeppelin v5 ERC721). Check totalSupply / mint events, and remember collections may start at id 0 or 1. - [EVM / Solidity 0xd93c0665: EnforcedPause](https://knowyourerror.com/evm/0xd93c0665-enforced-pause/): The contract is paused (OpenZeppelin v5 Pausable) and the function has whenNotPaused. Wait for the admin to unpause; check with paused(). - [EVM / Solidity 0x3ee5aeb5: ReentrancyGuardReentrantCall](https://knowyourerror.com/evm/0x3ee5aeb5-reentrancy-guard-reentrant-call/): A nonReentrant function was entered again before the first call finished, typically via a token or ETH callback. Expected for attacks; for legit flows, split the call or move the external call last. - [EVM / Solidity 0xe2517d3f: AccessControlUnauthorizedAccount](https://knowyourerror.com/evm/0xe2517d3f-access-control-unauthorized-account/): The caller lacks the required role (here MINTER_ROLE = keccak256("MINTER_ROLE")). Grant it with grantRole(role, account) from an admin of that role. ## Node.js errors - [All Node.js errors](https://knowyourerror.com/node/): POSIX errno codes surfaced by libuv and Node.js internal ERR_* codes. - [Node.js ECONNREFUSED: Connection refused](https://knowyourerror.com/node/econnrefused/): The target host answered with a TCP RST: nothing is listening on that address and port. Start the service, fix the host/port, and on Node 17+ use 127.0.0.1 instead of localhost if the server only binds IPv4. - [Node.js EADDRINUSE: Address already in use](https://knowyourerror.com/node/eaddrinuse/): Another process already listens on that port, often a previous dev server that did not exit. Kill it (lsof -ti :3000 | xargs kill) or use a different PORT, and close the server on SIGTERM. - [Node.js ERR_REQUIRE_ESM: require() of ES Module not supported](https://knowyourerror.com/node/err-require-esm/): CommonJS code called require() on an ESM-only package (node-fetch 3, chalk 5, nanoid 4…). Use await import(), switch your project to ESM, pin the last CJS version, or upgrade to Node ≥20.19 / 22.12 where require(esm) works. - [Node.js ENOENT: No such file or directory](https://knowyourerror.com/node/enoent/): The path does not exist relative to process.cwd(), not to the source file. Resolve paths with path.join(__dirname, ...) or new URL('./file', import.meta.url). - [Node.js ETIMEDOUT: Connection timed out](https://knowyourerror.com/node/etimedout/): No SYN-ACK came back before the OS timeout: firewall/security group dropping packets, wrong IP, or no route (private IP from a public network). Check reachability with nc -vz. - [Node.js ECONNRESET: Connection reset by peer](https://knowyourerror.com/node/econnreset/): The remote side abruptly closed the socket, often a keep-alive connection the server or LB already timed out. Retry idempotent requests and keep client idle timeouts below the server's. - [Node.js EMFILE: Too many open files](https://knowyourerror.com/node/emfile/): The process hit its file-descriptor limit (ulimit -n), from unclosed streams, unbounded parallel fs calls or file watchers. Close handles, limit concurrency, or raise the limit. - [Node.js ERR_MODULE_NOT_FOUND: Cannot find module (ESM)](https://knowyourerror.com/node/err-module-not-found/): ESM requires full relative paths with file extensions; there is no index.js or extension guessing. Import "./utils/db.js" (also from TypeScript sources with NodeNext). - [Node.js ERR_UNHANDLED_REJECTION: Unhandled promise rejection](https://knowyourerror.com/node/err-unhandled-rejection/): A promise rejected with a non-Error value (or no handler) and Node 15+ crashes the process by default. Await or .catch() every promise; log in process.on('unhandledRejection'). ## Next.js errors - [All Next.js errors](https://knowyourerror.com/nextjs/): Errors documented in the Next.js /errors directory, plus React hydration failures in App Router apps. - [Next.js react-hydration-error: Hydration failed: server/client mismatch](https://knowyourerror.com/nextjs/react-hydration-error/): The HTML React rendered on the server differs from the first client render, so React discards and re-renders the tree. Move time-, locale- or window-dependent values into useEffect and fix invalid nesting like
inside

. - [Next.js DYNAMIC_SERVER_USAGE: Dynamic server usage](https://knowyourerror.com/nextjs/dynamic-server-error/): During next build a route marked static (or force-static) called a dynamic API — cookies(), headers(), searchParams or no-store fetch. Mark the route dynamic, or stop swallowing the internal error in try/catch. - [Next.js next-image-unconfigured-host: next/image hostname not configured](https://knowyourerror.com/nextjs/next-image-unconfigured-host/): next/image only optimizes remote images from hosts allowed in next.config. Add the host to images.remotePatterns (protocol, hostname, optional pathname) and restart the dev server. - [Next.js missing-suspense-with-csr-bailout: useSearchParams() should be wrapped in a suspense boundary](https://knowyourerror.com/nextjs/missing-suspense-with-csr-bailout/): A statically prerendered page uses useSearchParams() without a boundary, which would client-render the whole page. Wrap the component that reads search params in . - [Next.js module-not-found: Module not found: Can't resolve](https://knowyourerror.com/nextjs/module-not-found/): A Node-only module (fs, path, crypto) was imported into code bundled for the browser, or a path alias/case is wrong. Keep server code in Server Components or add import 'server-only'. - [Next.js next-router-not-mounted: NextRouter was not mounted](https://knowyourerror.com/nextjs/next-router-not-mounted/): useRouter was imported from next/router inside the App Router. Import useRouter, usePathname and useSearchParams from next/navigation instead. - [Next.js sync-dynamic-apis: params should be awaited](https://knowyourerror.com/nextjs/sync-dynamic-apis/): In Next.js 15, params, searchParams, cookies() and headers() are async. Type params as a Promise and await it; run npx @next/codemod@canary next-async-request-api . to migrate. ## OpenAI API errors - [All OpenAI API errors](https://knowyourerror.com/openai/): Errors from api.openai.com and the official SDKs: quota and rate limits, context-length overflows, auth and model access. - [OpenAI API insufficient_quota: You exceeded your current quota](https://knowyourerror.com/openai/429-insufficient-quota/): Same 429 status as a rate limit, but the cause is billing: the project has no credit left or hit its monthly budget. Retrying never helps; add credits or raise the budget. - [OpenAI API context_length_exceeded: Maximum context length exceeded](https://knowyourerror.com/openai/context-length-exceeded/): The messages (plus tools and the output budget) do not fit in the model’s context window. Count tokens before sending and trim or summarize the oldest turns. - [OpenAI API rate_limit_exceeded: Rate limit reached (TPM/RPM)](https://knowyourerror.com/openai/429-rate-limit-exceeded/): You exceeded requests or tokens per minute for this model. Retry after the suggested delay with backoff; read the x-ratelimit-* headers to pace requests. - [OpenAI API invalid_api_key: Incorrect API key provided](https://knowyourerror.com/openai/401-invalid-api-key/): The key is wrong, revoked or has stray whitespace. Generate a new key in the right project and check the env var actually loads at runtime. - [OpenAI API model_not_found: The model does not exist or you do not have access](https://knowyourerror.com/openai/404-model-not-found/): Typo in the model ID, a retired snapshot, or a model your project is not allowed to use. List available models with GET /v1/models using the same key. ## Anthropic API errors - [All Anthropic API errors](https://knowyourerror.com/anthropic/): Errors from the Claude API at api.anthropic.com: overloads, rate limits on requests and tokens, prompt size and authentication. - [Anthropic API overloaded_error: API temporarily overloaded (529)](https://knowyourerror.com/anthropic/529-overloaded-error/): Anthropic’s API is briefly out of capacity across all users; your request and your limits are fine. Retry with exponential backoff, and fall back to another model if it persists. - [Anthropic API rate_limit_error: Rate limit exceeded (429)](https://knowyourerror.com/anthropic/429-rate-limit-error/): Your organization exceeded its requests-per-minute or tokens-per-minute limit for this model. Wait for the retry-after header, then cut token usage with prompt caching or smaller prompts. - [Anthropic API invalid_request_error: Prompt is too long](https://knowyourerror.com/anthropic/prompt-is-too-long/): The prompt plus requested output exceeds the model’s context window. Trim history, summarize old turns or retrieve only the relevant chunks; retrying the same request always fails. - [Anthropic API authentication_error: Invalid x-api-key (401)](https://knowyourerror.com/anthropic/401-authentication-error/): The API key is missing, revoked or sent in the wrong header. Anthropic expects it in x-api-key, not Authorization: Bearer. ## Google Gemini API errors - [All Google Gemini API errors](https://knowyourerror.com/gemini/): Errors from the Gemini API (generativelanguage.googleapis.com) and Vertex AI: quota, invalid keys, safety blocks and deadlines. - [Google Gemini API RESOURCE_EXHAUSTED: Quota exceeded (429)](https://knowyourerror.com/gemini/429-resource-exhausted/): You hit a Gemini API limit: requests per minute, tokens per minute or requests per day for this model and tier. Back off and retry for per-minute limits; per-day limits need billing or a higher tier. - [Google Gemini API API_KEY_INVALID: API key not valid](https://knowyourerror.com/gemini/400-api-key-invalid/): Gemini reports a bad key as 400 INVALID_ARGUMENT with reason API_KEY_INVALID, not 401. Create a key in Google AI Studio and check it is restricted to the Generative Language API. - [Google Gemini API SAFETY: Response blocked: finishReason SAFETY](https://knowyourerror.com/gemini/finish-reason-safety/): HTTP 200, but the candidate has no text because a safety filter stopped it. Check finishReason before reading the text, and adjust the prompt or safety settings for legitimate use cases. - [Google Gemini API DEADLINE_EXCEEDED: Deadline exceeded (504)](https://knowyourerror.com/gemini/504-deadline-exceeded/): The model did not finish within the deadline, usually on very large prompts or long outputs. Stream the response, raise the client timeout, or split the work. ## Reference - [Pricing](https://knowyourerror.com/pricing/): What is free, what Pro adds. - [Sitemap](https://knowyourerror.com/sitemap.xml): Every indexable URL.