Skip to main content
Technical

Error Code

An error code is a short, stable value a system returns to say what went wrong - a number like 404 or 50013, or a string like channel_not_found - so software can react to the failure and people can look it up.

Oct 6, 2026
7 min read
Conferbot Team

Key Takeaways

  • An error code is the stable, machine-readable part of a failure; the message is for humans and may change.
  • HTTP status codes describe the request class (4xx your side, 5xx theirs); platform codes in the body say exactly what failed.
  • 429 means slow down: honour Retry-After rather than retrying immediately.
  • Handle errors by code, log the full body, and keep a lookup for the platforms you use.

What Is an Error Code?

An error code is a short value that a program, API or device returns to say what went wrong. It is designed to be stable and machine-readable, so your code can branch on it - retry, ask the user to log in again, skip a deleted record - while the accompanying error message explains the problem to a person.

Codes come in two layers when you call a web API. The HTTP status code describes the class of failure, and many platforms add their own code in the response body that pins down the exact cause.

HTTP Status Codes vs Platform Error Codes

RangeMeaningCommon examples
2xxSuccess200 OK, 201 Created, 204 No Content
3xxRedirect301 Moved Permanently, 304 Not Modified
4xxThe request was wrong400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 429 Too Many Requests
5xxThe server failed500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout

Inside the body, platforms are more specific. Discord returns a numeric code such as 50013 Missing Permissions; Telegram returns error_code plus a description like Bad Request: chat not found; WhatsApp's Cloud API returns a Graph error with code and error_subcode; Slack answers HTTP 200 with "ok": false and a string such as channel_not_found. Two failures with the same HTTP status can need completely different fixes, which is why the body matters.

How to Read an Error Response

  1. Log the whole body, not just the status. The platform code and message live there.
  2. Check the class. A 4xx means change the request - credentials, permissions, parameters. A 5xx or timeout means retry later.
  3. Respect rate limits. On 429, wait for the time in Retry-After (or the platform's retry_after field) before trying again. Immediate retries extend the block.
  4. Look the code up. Our error code directory explains causes and fixes for WhatsApp, Telegram, Discord, Messenger, Instagram, Slack, LINE and Teams, and the limits pages list the quotas behind most 429s.

Designing Good Error Codes

If you build an API or a bot backend, good error codes are cheap to add and save hours later:

  • Keep codes stable and documented; never reuse one for a different meaning.
  • Return the right HTTP class as well as your own code, so generic clients behave sensibly.
  • Pair every code with a message a developer can act on, and a link to its documentation.
  • Distinguish retryable failures from permanent ones explicitly.

Error Codes in Chatbots

A chatbot calls several APIs on every message: the messaging channel, often an AI model, and your own systems through webhooks. Most "the bot stopped answering" incidents trace back to one error code - an expired token (401), a removed permission (403), a blocked user (403 on Telegram), or a rate limit (429). Logging them per channel turns a mystery into a one-line fix. Hosted platforms such as a website chatbot handle the retries and alerting for you.

Frequently Asked Questions

What is an error code in simple terms?
It is a short label a system gives a failure so both software and people can tell what went wrong. 404 means the thing you asked for is not there, 401 means you are not signed in, and a platform code such as Discord's 50013 means the bot lacks a permission. The code stays the same even if the wording of the message changes.
What is the difference between an error code and an error message?
The code is for programs: short, stable and meant to be compared exactly. The message is for people: a sentence that explains the problem and may change between versions or languages. Write your error handling against the code, and show or log the message for whoever has to fix it.
What do 4xx and 5xx error codes mean?
4xx codes mean the request itself was the problem - bad parameters, missing credentials, no permission, too many requests - so retrying the same request will fail again. 5xx codes mean the server failed while handling a valid request, so retrying later, ideally with backoff, often succeeds.
What should I do with a 429 error code?
Slow down. 429 Too Many Requests means you hit a rate limit. Read the Retry-After header or the platform's retry_after value, wait at least that long, and spread later requests out. Retrying instantly usually extends the limit, and repeated violations can get an app or bot restricted.
Where can I look up Telegram, Discord or WhatsApp error codes?
Each platform documents its own, and our error code directory gathers them with the literal message, the cause and step-by-step fixes: WhatsApp Cloud API codes, Telegram Bot API errors, Discord JSON and gateway codes, and the Messenger, Instagram, Slack, LINE and Teams equivalents.
Omnichannel Platform

One Chatbot,
Every Channel

Your chatbot works seamlessly across WhatsApp, Messenger, Slack, and 6 more platforms. Build once, deploy everywhere.

View All Channels
Conferbot
online
Hi! How can I help you today?
I need pricing info
Conferbot
Active now
Welcome! What are you looking for?
Book a demo
Sure! Pick a time slot:
#support
Conferbot
New ticket from Sarah: "Can't access dashboard"
Auto-resolved. Password reset link sent.
Free Chatbot Templates

Ready to Build Your
Chatbot?

Browse free templates for every industry and deploy in minutes. No coding required.

100% Free
No Code
2-Min Setup
Lead Generation
Capture & qualify leads
Customer Support
24/7 automated help
E-commerce
Boost online sales