oracle / oci-typescript-sdk

Oracle Cloud Infrastructure SDK for TypeScript and JavaScript
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdk.htm
Other
71 stars 51 forks source link

oci-onesubscription doesn't working 404 #211

Closed samuelastech closed 1 year ago

samuelastech commented 1 year ago

I'm using the provided snippet on https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.62.0/onesubscription/ListSubscriptions.ts.html but always getting a 404 status code error:

Request cannot be retried. Not Retrying. Exception occurred : Error: Not Found
OciError: Not Found
    at Object.handleErrorResponse (/home/samuel/Think/oci/node_modules/oci-common/lib/helper.js:41:16)
    at GenericRetrier.<anonymous> (/home/samuel/Think/oci/node_modules/oci-common/lib/retrier.js:143:54)
    at Generator.next (<anonymous>)
    at fulfilled (/home/samuel/Think/oci/node_modules/oci-common/lib/retrier.js:9:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 404,
  serviceCode: 'None',
  opcRequestId: 'D6052E3000AD-11EE-8A33-6B812F33A/F529B2ACA466774636767F6697C738D7/E324412B02C245F5419D2A32AE099CE4',
  targetService: 'Subscription',
  operationName: 'listSubscriptions',
  timestamp: '2023-06-01T18:55:11.508Z',
  requestEndpoint: 'GET https://identity.sa-saopaulo-1.oci.oraclecloud.com/20190111/subscriptions?compartmentId=ocid1.tenancy.oc1..aaaaaaaau5cp2melgdlaavx52sw7xdg365cuncuwb36catdgq2qhqhwd7qsq',
  clientVersion: 'Oracle-TypeScriptSDK/2.62.0',
  loggingTips: 'To get more info on the failing request, refer to https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdkconcepts.htm#typescriptsdkconcepts_topic_Logging for ways to log the request/response details.',
  troubleshootingTips: 'See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_404__404_none for more information about resolving this error If you are unable to resolve this Subscription issue, please contact Oracle support and provide them this full error message.'
}

In the listSubscriptionsRequest, I'm only passing the compartmentId. What is wrong?

KartikShrikantHegde commented 1 year ago

Hi @samuelastech , can you check if you have the right permission to access the resource and if the resource exists?

If both of the above conditions are true, then we can reach out to the service team who can tell us what permissions you are missing or if the resource doesn't exist. Thanks.

KartikShrikantHegde commented 1 year ago

Hi @samuelastech , I am closing this ticket for now. Please feel free to re-open the issue if you hit the issue again. Thanks.