diff --git a/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java b/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java index c91dbaa..7adb447 100644 --- a/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java +++ b/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java @@ -279,7 +279,9 @@ private Mono getFile(String token, if (!Objects.equals(OK.value(), result.getCode())) { if (ignoreNotFound && Objects.equals(INTERNAL_SERVER_ERROR.value(), result.getCode()) - && "object not found".equals(result.getMessage())) { + // According to https://alist.nn.ci/guide/api/fs.html, we have no better + // way to determine whether the file exists + && StringUtils.endsWith(result.getMessage(), "object not found")) { return Mono.empty(); } return Mono.error(new ServerWebInputException(