ReferenceError: __DEV__ is not defined
techgyani opened this issue · comments
Describe the bug
SQUARE SDK 28.0.1 has the below error coming randomly. I think, it comes if the API request gets failed.
2023-06-22T15:16:02.582Z error in process ReferenceError: DEV is not defined
2023-06-22T15:16:02.583Z at new ApiError (/usr/src/app/node_modules/square/dist/cjs/errors/apiError.js:47:17)
2023-06-22T15:16:02.584Z at /usr/src/app/node_modules/@apimatic/core/lib/http/requestBuilder.js:371:23
2023-06-22T15:16:02.585Z at DefaultRequestBuilder. (/usr/src/app/node_modules/@apimatic/core/lib/http/requestBuilder.js:176:50)
2023-06-22T15:16:02.585Z at step (/usr/src/app/node_modules/tslib/tslib.js:193:27)
2023-06-22T15:16:02.586Z at Object.next (/usr/src/app/node_modules/tslib/tslib.js:174:57)
2023-06-22T15:16:02.587Z at fulfilled (/usr/src/app/node_modules/tslib/tslib.js:164:62)
2023-06-22T15:16:02.588Z at processTicksAndRejections (node:internal/process/task_queues:96:5)
Expected behavior
API errors should be handled cleanly.
To Reproduce
Steps to reproduce the bug:
- Create environment in your machine so that API call fails.
Screenshots
If applicable, add screenshots to help explain the bug.
Square SDK version
28.0.1
Additional context
It works fine if I retry the api call.
Hey @techgyani,
Thanks for bringing this to our attention!
Which API are you calling when this happens? And is this while using Production or Sandbox?
@zenmasterjobo I am using production API of Square. It is happening randomly when calling list-payout-entries.
Hey @techgyani -
Just wanted to let you know that we have found a fix for this and are looking to patch it in soon. However it might end up that this fix goes out with our next SDK release on July 20th. Thanks for your patience!
Cheers!
Thank you @zenmasterjobo
Is there a fix for this for v27? Thanks!
Hi - sorry this fix was implemented and exists in v29.0.0
Please consider upgrading versions - but there is a reason you cannot, I would be interested to know what breaking change may be stopping you
Closing as issue is resolved in v29.0.0
Please re-open if issue persists