Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert errorHandlers to TypeScript #1251

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Convert errorHandlers to TypeScript #1251

wants to merge 14 commits into from

Conversation

kemmerle
Copy link
Contributor

@kemmerle kemmerle commented Nov 20, 2024

Description and Context

I've converted the files located in the lib/errorHandlers folder.

Problem with eslint as been addressed 👍

TODO

  • Address eslint error
  • Address other feedback

Who to Notify

@brandenrodgers @camden11 @joe-yeager

lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
lib/commonOpts.ts Outdated Show resolved Hide resolved
lib/ui/serverlessFunctionLogs.ts Outdated Show resolved Hide resolved
lib/ui/spinniesUtils.ts Outdated Show resolved Hide resolved
lib/ui/serverlessFunctionLogs.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/ui/supportHyperlinks.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a good rule to follow in these Typescript PRs is to never cast unless you absolutely have to - 99% of the time there's a better way and not letting yourself cast will force you to find it! I'm always around if you have any questions about that kind of stuff.

Also, it looks like your commits from your last PR got included here, i'm assuming this is because we are now squashing commits and you need to rebase off main (unfortunately i haven't worked with squash commits in a bit and I forget exactly how to do that)

lib/commonOpts.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, things are looking really good here! I just have a few small comments and then this should be good to go

lib/errorHandlers/index.ts Outdated Show resolved Hide resolved
lib/errorHandlers/index.ts Show resolved Hide resolved
lib/errorHandlers/suppressError.ts Outdated Show resolved Hide resolved
cause: isAxiosError(error.cause)
? error.cause
: util.inspect(error.cause, false, null, true),
cause: util.inspect(error.cause, false, null, true),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I'm coming in after a few rounds of reviews (so apologies if this was already covered), but is this functionally equivalent to what it did before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants