codex-team / codex-team/codex-accounting
TypeError: Class constructor ApolloError cannot be invoked without 'new' (src/resolvers/deposits.ts:54)
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
I encountered with this error in the docker container logs. It is related to the `ApolloError` class not being called with the `new` keyword. But that doesn't actually seem to be the case.
In src/errors.ts (line 25), `NonCriticalError` class extends the `ApolloError` class.
In the src/resolvers/deposit.ts (line 54), calls the extended `NonCriticalError` class with the `new` keyword. So it should work fine.
Could be a problem with my setup, thought I should report about this.
```
TypeError: Class constructor ApolloError cannot be invoked without 'new'
at new NonCriticalError (/usr/src/app/src/errors.ts:25:42)
at /usr/src/app/src/resolvers/deposits.ts:54:13
at step (/usr/src/app/src/resolvers/deposits.ts:52:23)
at Object.next (/usr/src/app/src/resolvers/deposits.ts:33:53)
at /usr/src/app/src/resolvers/deposits.ts:27:71
at new Promise ()
at __awaiter (/usr/src/app/src/resolvers/deposits.ts:23:12)
at deposit (/usr/src/app/src/resolvers/deposits.ts:72:16)
at field.resolve (/usr/src/app/node_modules/graphql-extensions/src/index.ts:274:18)
at field.resolve (/usr/src/app/node_modules/apollo-server-core/src/utils/schemaInstrumentation.ts:103:18)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.