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

Add more status codes Closes #2 #15

Closed
wants to merge 1 commit into from
Closed

Add more status codes Closes #2 #15

wants to merge 1 commit into from

Conversation

dawsbot
Copy link

@dawsbot dawsbot commented Apr 21, 2019

What: Add more http status codes

Why: Closes #2

How: Found a friendly json list from here, ran a quick script, and inserted them into the codebase. After testing both unit testing and visually, I think it's ready for feedback!

Checklist:

  • Tests
  • Ready to be merged

Screen Shot 2019-04-21 at 8 17 04 PM

"I'M A TEAPOT": "418",
"UPGRADE REQUIRED": "426",
"**SERVER ERROR**": "5xx",
"INTERNAL SERVER ERROR": "500",
Copy link
Author

Choose a reason for hiding this comment

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

Notice that this no longer has the underscores as previously. Is that going to be a problem?

@codecov-io
Copy link

Codecov Report

Merging #15 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master      #15   +/-   ##
=======================================
  Coverage   93.44%   93.44%           
=======================================
  Files          16       16           
  Lines         229      229           
  Branches       43       43           
=======================================
  Hits          214      214           
  Misses         15       15

@boyney123
Copy link
Owner

Wow thanks @dawsbot ,

That dropdown list is abit epic and long! Some crazy status codes in there 418, wonder if we should just pick the most common ones? Know of any lists for them?

Also, each status code has to work with express as the get mapped in the server code. So things like 3xx I'm not sure will work?

@dawsbot
Copy link
Author

dawsbot commented Apr 24, 2019

Good question, I'm not sure if the XX's will work with express. I actually don't undestand the docker build setup in this project for local dev, so testing everything takes a very long time. Perhaps you can provide more info for how to run everything locally? On React changes, I had to kill docker and restart everything 😂

@mrjasongorman
Copy link

@dawsbot Can you use <optgroup> instead?

e.g

<label>StatusCode:
  <select>
    <optgroup label="2xx">
      <option value="200">200 OK</option>
      <option value="202">202 ACCEPTED</option>
      etc
    </optgroup>
    <optgroup label="3xx">
      <option value="301">301 MOVED PERMANENTLY</option>
      <option value="302">302 FOUND</option>
      etc
    </optgroup>
  </select>
</label>

@dawsbot
Copy link
Author

dawsbot commented Apr 27, 2019

@mrjasongorman feel free to take my progress and run with it, I won't get time for this for 1 week or more. You've now got write access on my fork

@boyney123
Copy link
Owner

@mrjasongorman fancy helping out on this one?

@boyney123
Copy link
Owner

Hey @dawsbot

We have some more status codes coming in 1.1.0 (released very soon), I'm not 💯 about the UI on this one, so I'm going to leave it out for now. Feel free to pick it back up if you get the time or chance too.

@boyney123 boyney123 closed this May 24, 2019
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.

Add more status codes
4 participants