A custom runtime exception used to capture and communicate API errors, network failures, or serialization issues to developers.
// Source: https://github.com/Lians-ai/Lians | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package ai.lians;
/**
* Thrown when the Lians server returns a non-2xx response, or when a request
* cannot be completed (network/timeout/serialization error).
*/
public class LiansException extends RuntimeException {
private static final long serialVersionUID = 1L;
/** HTTP status code, or 0 when the failure was not an HTTP response. */
private final int status;
/** Raw response body (or error detail) returned by the server. */
private final String body;
public LiansException(int status, String body, String message) {
super(message);
this.st
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key