Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove statuses package, use built in http.STATUS_CODES #26

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

Merged
HappyZombies merged 1 commit into development from feature.http-status
Oct 11, 2021

Conversation

@HappyZombies
Copy link
Member

@HappyZombies HappyZombies commented Oct 11, 2021
edited
Loading

This PR simply removes the statuses dependency from the module and uses the built in

The http.STATUS_CODES object has been a part of Node since the beginning, since v0.1.22 actually, so this should not affect backwards combability.

The statuses package was only being used in the OAuthError class (lib/errors/oauth-error.js). The OAuthError class takes two properties, first being either a message or an Error object instance, while the second property can support taking a "code" along with a few other properties (read more in the docs about this class).

Anyways, if the second property did not contain anything, it will default to the value of {code: 500}, and then it will access the http.STATUS_CODES to retrieve the message for this error to then attach it to the custom OAuthError object.

This addresses and resolves #21

@HappyZombies HappyZombies changed the title (削除) Remove statuses package, use built http.STATUS_CODES (削除ここまで) (追記) Remove statuses package, use built in http.STATUS_CODES (追記ここまで) Oct 11, 2021
Copy link
Member Author

FYI -- this will make #9 invalid and be closed once this is approved.

Copy link
Member

@jankapunkt jankapunkt left a comment

Choose a reason for hiding this comment

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

looks good no issues here

Copy link
Member

@HappyZombies you can take a second look and merge if you like

HappyZombies reacted with hooray emoji

@HappyZombies HappyZombies merged commit 4d893e4 into development Oct 11, 2021
@HappyZombies HappyZombies deleted the feature.http-status branch October 12, 2021 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jankapunkt jankapunkt jankapunkt approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /