fix(remix,nextjs,clerk-react): Export EmailLinkErrorCode from /errors#2732
Conversation
🦋 Changeset detectedLatest commit: 84d7149 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
c06924e to
84d7149
Compare
There was a problem hiding this comment.
🙃 Wdyt about introducing a different structure to support subpath errors and error messages? Eg
// remix/src/errors/index.ts
export {
isClerkAPIResponseError,
isEmailLinkError,
isKnownError,
isMetamaskError,
EmailLinkErrorCode,
} from '@clerk/clerk-react/errors';
// remix/src/errors/messages.ts
const createErrorMessage = (msg: string) => {
// ...
}
// ... all the error messages that are being moved to utils/errors with this PR
I would prefer if we kept all the errors in the same place and avoid adding them to utils "bucket".
There was a problem hiding this comment.
Definitely, but we cannot do this using a single errors.ts as this is the top-level entry file for the publicly available errors.
This PR changes the top-level API. I will open follow-up PR that aligns the strategy used in clerk/remix with the other packages as well.
Having a internalErrors could be enough, or we could always have a ./errors/ containing internal error utils and a ./errors.ts top level entry point for the public APIs
| import { noSecretKeyError, satelliteAndMissingProxyUrlAndDomain, satelliteAndMissingSignInUrl } from '../errors'; | ||
| import { getEnvVariable } from '../utils'; | ||
| import { noSecretKeyError, satelliteAndMissingProxyUrlAndDomain, satelliteAndMissingSignInUrl } from '../utils/errors'; | ||
| import { getEnvVariable } from '../utils/utils'; |
There was a problem hiding this comment.
😓 this seems kind of weird, that's why i suggested the errors restructuring.
Description
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore