Describe the bug
I am emitting an error from connect-go
like so:
connectgo.NewError(connectgo.CodeFailedPrecondition, errors.New("Service is disabled."))
The server is emitting the error correctly but when the transport handler calls connectFromReason, the instanceof
check is failing and a new error is being created with the default code Internal
.
See debugger output below. The error should have been returned on line 98 but instead the instanceof
check fails and the code continues to create a new error.
Here are more details about the error:
I did some research and from what I can tell this should ensure that we can correctly determine what the class is but it seems not to be working as expected:
Environment (please complete the following information):
npm list
├── @bufbuild/[email protected]
├── @bufbuild/[email protected]
├── @bufbuild/[email protected]
├── @bufbuild/[email protected]
├── @parcel/[email protected]
├── @primer/[email protected]
├── @primer/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
I just noticed a new release and tried the new versions but still not working.
├── @bufbuild/[email protected]
├── @bufbuild/[email protected]
├── @bufbuild/[email protected]
├── @bufbuild/[email protected]
Hi @danielhochman. Could you provide a few more details about your environment? For example:
tsconfig.json
file?npx tsc && parcel build src/index.html
Trying to track this error down and have been unable to recreate it locally thus far.
tsconfig.json
{
"compilerOptions": {
"jsx": "react",
"target":"es2022",
"moduleResolution": "node",
"types": ["react/next", "react-dom/next"]
},
"include": ["source/*.ts*"],
"exclude": ["node_modules/**/*"]
}
.parcelrc
{
"extends": "@parcel/config-webextension"
}
build command (this is a browser extension)
parcel build source/manifest.json
Owner Name | bufbuild |
Repo Name | connect-es |
Full Name | bufbuild/connect-es |
Language | TypeScript |
Created Date | 2022-02-16 |
Updated Date | 2023-03-24 |
Star Count | 852 |
Watcher Count | 20 |
Fork Count | 33 |
Issue Count | 17 |
Issue Title | Created Date | Updated Date |
---|