Co-authored-by: gitea-actions-bot <bot@mein-gateway.de> Reviewed-on: #1 Co-authored-by: Thilo Schwarz <osp@thischwa.codes>
This commit is contained in:
1 parent
4b560141a1
commit
8515f81621
32 files changed
+2223
-424
No files matched your search
@@ -1,14 +1,21 @@
|
||||
package codes.thischwa.cf;
|
||||
|
||||
import codes.thischwa.cf.model.ResponseResultInfo;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This exception is thrown to indicate that a requested resource was not found during interaction
|
||||
* with the Cloudflare API.
|
||||
*
|
||||
* <p>It extends {@link CloudflareApiException} to provide specific errors related to situations
|
||||
* where Cloudflare responds with a "not found" operation.
|
||||
* <p>It is thrown if Cloudflare responds with HTTP status 404, or if a result is empty and
|
||||
* 'emptyResultThrowsException' is enabled.
|
||||
*/
|
||||
public class CloudflareNotFoundException extends CloudflareApiException {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Constructs a new CloudflareNotFoundException with the specified detail message.
|
||||
*
|
||||
@@ -18,4 +25,16 @@ public class CloudflareNotFoundException extends CloudflareApiException {
|
||||
public CloudflareNotFoundException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new CloudflareNotFoundException caused by an API response.
|
||||
*
|
||||
* @param message the detail message
|
||||
* @param statusCode the HTTP status code of the response
|
||||
* @param errors the errors reported by Cloudflare, may be {@code null}
|
||||
*/
|
||||
public CloudflareNotFoundException(String message, int statusCode,
|
||||
List<ResponseResultInfo.Error> errors) {
|
||||
super(message, statusCode, errors);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user