Package error

Class GlobalpingApiError

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ForbiddenException, InternalServerErrorException, NotFoundException, ProbesNotFoundException, TooManyRequestsException, UnauthorizedException, ValidationException

public class GlobalpingApiError extends Exception
Represents an API error encountered when interacting with the Globalping service. By default, it throws like Exception but captures statusCode as well.

The only public constructor uses raise(ByteArrayOutputStream, HttpURLConnection) method reads the response stream, extracts the status code, and throws a specific exception based on the HTTP response code as follows:

See Also: