Skip to content

Unable to see error of retrier in OCI SDK #293

Open
@kunarkkhewal

Description

@kunarkkhewal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    SDKIssue pertains to the SDK itself and not specific to any service

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions