oracle / oracle/oci-typescript-sdk

Unable to see error of retrier in OCI SDK

Open
#293 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

SDK
Dominant language
TypeScript
Stars
100
Forks
64
Avg merge
14m
Merged PRs (30d)
5

Description

In my project, I use OCI object storage, while running on local env. everything is working fine, but on deployment, I am receiving errors like this

Request failed with Exception : [object Object]
Retrying request -> Total Attempts : 1, Retrying after 1.686 seconds...

I am using 'oci-sdk' package for JS/TS
After digging into the package under oci-common/lib/retrier.js I found in line 179
console.warn(`Request failed with Exception : ${lastKnownError}\nRetrying request -> Total Attempts : ${waitContext.attemptCount}, Retrying after ${delayTime} seconds...`);

this should be updated to
console.warn(`Request failed with Exception : ${JSON.stringify(lastKnownError, null, 2)}\nRetrying request -> Total Attempts : ${waitContext.attemptCount}, Retrying after ${delayTime} seconds...`);

because in string literal if we try to print any object it shows as [object Object]

This can act as a blocker in the development because proper error is not shown.

Thank you

Contributor guide

Open the contributing guide

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 in oci-common/lib/retrier.js at line 179, where the retry warning formats lastKnownError. Verify how the current warning renders an object and update the output so the error details are readable; done means retry warnings no longer show only [object Object].

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs, typescript
Domain
cloud
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.