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

[CLOSES #9] Add library for HTTP Status Codes and HTTP Method #239

Merged
merged 4 commits into from Mar 4, 2019

Conversation

Projects
None yet
2 participants
@adrw
Copy link
Member

adrw commented Mar 4, 2019

  • [CLOSES #9] Add http-method-enum and status-code-enum
  • Add enum-utils
  • Use status-code enums instead of hard coded numbers

@adrw adrw changed the title Adrw/20190304.http enum Add library for HTTP Status Codes and HTTP Method Mar 4, 2019

@adrw adrw changed the title Add library for HTTP Status Codes and HTTP Method [CLOSES #9] Add library for HTTP Status Codes and HTTP Method Mar 4, 2019

@adrw adrw force-pushed the adrw:adrw/20190304.HttpEnum branch 2 times, most recently from 80cf268 to 93de280 Mar 4, 2019

@wesleyk

wesleyk approved these changes Mar 4, 2019

@@ -80,7 +81,8 @@ export const errorMessage = (error: any) => {
let code = error.errorCode
if (!code) {
code =
error.response && error.response.status === 401
error.response &&

This comment has been minimized.

@wesleyk

wesleyk Mar 4, 2019

Collaborator

so errorCode can be non-null but response could be null? When is that possible? Can you share the interface of error and the API that it exposes?

This comment has been minimized.

@adrw

adrw Mar 4, 2019

Author Member

Not a very well defined API. Primarily displays any JSON object passed in. If it is an error from Axios response and has a response.code then it will parse out the code and include it in the title of the <ErrorCalloutComponent/>. There are many other outstanding bugs / improvements for that component so a more documented / thought out API would be something to work towards.

@adrw adrw force-pushed the adrw:adrw/20190304.HttpEnum branch from 93de280 to 476cd6a Mar 4, 2019

@adrw adrw merged commit dc76c08 into square:master Mar 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.