aliyun / aliyun/alibabacloud-java-async-sdk

putObject throws darabonba.core.exception.TeaException: The value is not a map

Open
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
34
Forks
29
PR merge metrics
No merged PRs in 30d

Description

PutObjectRequest putObjectRequest = PutObjectRequest.builder() //
.bucket("bucket") //
.key(key) //
.body(body) //
.build();
CompletableFuture response = asyncClient.putObject(putObjectRequest);

Caused by: darabonba.core.exception.TeaException: The value is not a map at darabonba.core.utils.CommonUtil.assertAsMap(CommonUtil.java:45) at com.aliyun.sdk.gateway.oss.internal.interceptor.TransformRequestBodyInterceptor.fromBody(TransformRequestBodyInterceptor.java:58) at com.aliyun.sdk.gateway.oss.internal.interceptor.TransformRequestBodyInterceptor.modifyRequest(TransformRequestBodyInterceptor.java:31) at darabonba.core.interceptor.InterceptorChain.modifyRequest(InterceptorChain.java:69) at darabonba.core.TeaAsyncHandler.execute(TeaAsyncHandler.java:155) at com.aliyun.sdk.service.oss20190517.DefaultAsyncClient.putObject(DefaultAsyncClient.java:1225) at com.example.service.AliyunOssService.putObject(AliyunOssService.java:54) at com.example.service.AliyunOssServiceTests.testGetObject1(AliyunOssServiceTests.java:73) ... 69 more Caused by: java.lang.RuntimeException: The value is not a object ... 77 more

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PutObjectRequest example and the stack trace, then inspect TransformRequestBodyInterceptor.java, CommonUtil.java, and DefaultAsyncClient.putObject. Reproduce the async putObject call with the shown request and trace how its body is transformed. Done means the reported request no longer throws the map/object conversion exception and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.