Error 101” is a generic error number — it does not have one universal meaning.Different systems use the same number for different problems.
If you are getting 101 while requesting something over http, it’s probably because it sent a 101 Switching Protocols header?
If it is being raised from some other thing, check which library/tool/api sends it, and consult their documentation for what 101 indicates in their world.
HTTP 101 Switching Protocols:
What it is: A status code sent by a server to indicate it is switching to a different protocol, like from HTTP to WebSocket.
Why it happens: This is a normal part of a successful communication handshake and is not an error you typically need to fix in your code.
Python exit status 101:
What it is: An exit status from a Python script, often related to issues with the Python environment or virtual environment setup.
Why it happens: It can be caused by a space in the path to your executable or other configuration problems.
How to fix: Check for spaces in your file path and ensure your virtual environment is set up correctly. A common solution is to delete the target folder and rebuild the project.
Network connectivity issues:
What it is: An error from a socket or network connection attempt.
Why it happens: This could be due to firewall restrictions, an unstable internet connection, or server-side problems.
How to fix: Check your internet connection. If you are on a work network, the firewall might be blocking the connection, in which case changing to HTTPS may help, as seen in a Meta Stack Exchange post.
Missing user cookie:
What it is: An error that can occur in an Android app, indicating a problem with user authentication.
Why it happens: The application’s session cookie may have been lost or is missing.
How to fix: The solution depends on the specific application, but it generally involves re-authenticating the user or clearing the app’s cache.
HTTP / Browsers : 101 Switching Protocols: A valid HTTP/1.1 response status meaning the server is switching to the protocol requested by the client (typically used for WebSocket handshakes). Not an error — a protocol upgrade acknowledgement.
WebSocket / Socket Handshakes: 101 indicates the server accepted the WebSocket upgrade and is switching from HTTP to WebSocket. Successful transition; subsequent frames follow the WebSocket framing rules.
Networking / Proxies / CDN: Some CDNs or proxies use internal error codes; 101 can be a transient upstream connection or DNS resolution failure in vendor-specific diagnostics. Interpretation is vendor-dependent — check provider docs or status page.
Operating systems / APIs: Windows socket (Winsock) WSAEINPROGRESS is numeric 10036, not 101, but some libraries map internal statuses to short codes; 101 may indicate “network unreachable” or “protocol not available” in embedded or custom stacks. Always check the API’s error mapping table.
Databases:
Database engines or drivers sometimes use 101 for authentication failure, record-not-found, or reserved operation errors — this is implementation-specific.
Applications and Services: Mobile apps, desktop software, and game servers often define their own 101 code (e.g., “session expired”, “invalid token”, “payment required”, or “temporary service error”). Consult the app’s error documentation or logs.
How to diagnose a 101 code quickly
Identify the source: Note which component emitted 101: browser console, server log, API response body, SDK exception, system log.
Capture context
For HTTP/WebSocket: request URL, request/response headers, status line, and response body.
For system/API: error message string, stack trace, and API call that produced it.
For vendor services: request ID, timestamp, and region.
Consult authoritative docs
RFCs for HTTP/WebSocket (RFC 7231, RFC 6455), vendor SDK/API docs, or the application’s error code reference.
Reproduce and isolate
Reproduce with curl/Postman or a minimal client. Disable intermediaries (proxies, VPNs) to isolate network vs. application cause.
Common fixes
HTTP 101 (WebSocket): ensure client sends correct Upgrade/Connection headers and server supports WebSocket; complete handshake with proper Sec-WebSocket-Accept calculation.
Proxy/CDN vendor-specific 101: check upstream health, DNS, and provider status; retry after brief delay.
Auth/session 101 (apps): refresh tokens, reauthenticate, or clear cached credentials.
If ambiguous: enable verbose logs, capture network traces (tcpdump/Wireshark), and match timestamps to service logs.
scenarios
Browser console shows “101 Switching Protocols” during a WebSocket handshake — expected, not an error.
A game server returns code 101 in JSON with message “session expired” — client should prompt re-login or refresh token.
A CDN status page maps code 101 to “edge-to-origin connection timed out” — retry or route around affected POP.
If the environment is known (browser, specific service, OS, or SDK), consult that component’s documentation for the exact meaning of 101 and follow the diagnostic path above.
Examples:
// Source – https://stackoverflow.com/q
”Error validating application. Application has been deleted.”,”type”:”OAuthException”,”code”:101
Android Error Code 101:
RtcTokenBuilder token = new RtcTokenBuilder();
int timestamp = (int) (System.currentTimeMillis() / 1000 + expirationTimeInSeconds);
String result = token.buildTokenWithUserAccount(appId, appCertificate, chenal, "0", RtcTokenBuilder.Role.Role_Publisher, timestamp);
Log.e("live Token", "***************Token: tkn == " + result);
kubernetes Error code 101
container name: spark-kubernetes-driver
container image: newfrontdocker/spark:v3.0.1-j14
container state: terminated
container started at: 2021-07-17T11:49:46Z
container finished at: 2021-07-17T11:49:48Z
exit code: 101
termination reason: Error
INFO LoggingPodStatusWatcherImpl: Application spark-pi with submission ID default:spark-pi-4ed9627ab44c778d-driver finished