Skip to content

getSpecificProduct returning as rejected every time. #1

@TristonStuart

Description

@TristonStuart

When running getSpecificProduct it is always rejected.

Here is the proof :
I try getting a specific product. Node.js tells me it was rejected and I didn't handle it. So I add a catch statement and log it. It gives me the expected outcome. However, this should be resolved as it is the correct response not rejected.
Console :

global.c = API.getSpecificProduct('tjhschR')
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events:
      [Object: null prototype] {
        removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
~ (node:4736) UnhandledPromiseRejectionWarning: #<Object>
(node:4736) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4736) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
~ global.c = API.getSpecificProduct('tjhschR').catch(console.log)
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events:
      [Object: null prototype] {
        removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
~ { id: 'tjhschR',
  attachment_id: null,
  title: ' -- Removed --',
  description:
   '-- Removed --',
  image: null,
  unlisted: false,
  type: 'account',
  price: 10,
  currency: 'USD',
  email: { enabled: false },
  stock_warning: 0,
  quantity: { min: 1, max: 1000000 },
  confirmations: 3,
  custom_fields: [],
  gateways: [ 'PayPal' ],
  webhook_urls: [],
  dynamic_url: '',
  position: null,
  created_at: '2020-04-22T21:49:07.000000Z',
  updated_at: '2020-04-24T09:40:20.000000Z',
  seller: 'tdstuart',
  stock: '2',
  accounts: [ { account: '-----' }, { account: '----------' } ] }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions