foundersandcoders / prereq-check

A FAC application prerequisite checker: to be used by applicants and the selection committee :fire:
https://prereq-check.herokuapp.com
18 stars 2 forks source link

Display codewars prereq info: Kyu level #2

Closed BartBucknill closed 7 years ago

BartBucknill commented 7 years ago

As a selection panel member I can see whether the applicant has attained 5 Kyu. As an applicant I can see whether I have attained 5 Kyu.

Acceptance criteria:

summary page

dangerdak commented 7 years ago

blocked by #16

dangerdak commented 7 years ago

@astroash relating to cea3e68. I think we were handling errors incorrectly: https://github.com/request/request-promise#get-a-rejection-only-if-the-request-failed-for-technical-reasons (this suggests that the default behaviour is for the catch block to be called if the response status code is 404, like it is when we provide an incorrect username)

So I've moved the logic to deal with the case of an invalid user outside of the getKyu function, and it's checked in the router instead.

Happy to roll back the commit if you feel like I've made stuff worse/more confusing.