larksuite / larksuite/oapi-sdk-java
下载文件接口http状态码非200时报错,The result returned by the server is illegal
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 310
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
版本:2.3.0
比如输入一个错误的file_token时就会抛出上面的异常
调用方法:client.drive().v1().file().download()
// file.java 第417行
DownloadFileResp resp = UnmarshalRespUtil.unmarshalResp(httpResponse, DownloadFileResp.class);
if (resp == null) {
throw new IllegalArgumentException("The result returned by the server is illegal");
}
此时resp为null,接着就会抛出异常
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at file.java line 417 and trace client.drive().v1().file().download(), focusing on how UnmarshalRespUtil handles a non-200 response. Reproduce the problem with an invalid file_token and verify that the download path handles the server error without raising the generic illegal-result exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100