Browse Source

Throws the correct exception for the updateResource interface (#13120)

Co-authored-by: rqyin <rqyin@easipass.com>

(cherry picked from commit f9cf9331a6)
3.0.4-release
J·Y 2 years ago committed by Jay Chung
parent
commit
e970ead651
  1. 3
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java

3
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java

@ -64,7 +64,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.rmi.ServerException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
@ -1326,7 +1325,7 @@ public class ResourcesServiceImpl extends BaseServiceImpl implements ResourcesSe
return org.apache.dolphinscheduler.api.utils.FileUtils.file2Resource(localFileName);
} catch (IOException e) {
logger.error("download resource error, the path is {}, and local filename is {}, the error message is {}", fileName, localFileName, e.getMessage());
throw new ServerException("download the resource file failed ,it may be related to your storage");
throw new ServiceException("download the resource file failed ,it may be related to your storage");
}

Loading…
Cancel
Save