MelonApiException
class MelonApiException extends Exception
Exception thrown when the Melon API returns an error or invalid response.
Methods
__construct(string $message = '', int $code = 0, Throwable|null $previous = null)
Create a new MelonApiException instance
static MelonApiException
invalidResponse(string $expectedKey)
Create exception for invalid response structure
static MelonApiException
requestFailed(string $url, string $reason)
Create exception for HTTP request failure
static MelonApiException
jsonParseError(string $url, string $error)
Create exception for JSON parsing failure
static MelonApiException
emptyResponse(string $url)
Create exception for empty response.
Details
at line 21
__construct(string $message = '', int $code = 0, Throwable|null $previous = null)
Create a new MelonApiException instance
at line 29
static MelonApiException
invalidResponse(string $expectedKey)
Create exception for invalid response structure
at line 37
static MelonApiException
requestFailed(string $url, string $reason)
Create exception for HTTP request failure
at line 45
static MelonApiException
jsonParseError(string $url, string $error)
Create exception for JSON parsing failure
at line 53
static MelonApiException
emptyResponse(string $url)
Create exception for empty response.