Mentorship-backend: Fix: refactor HTTP error codes POST /login for Users service

Created on 4 Jun 2020  路  10Comments  路  Source: anitab-org/mentorship-backend

Description

As a GSoC student,
I need the correct HTTP error response code to be returned accordingly by Mentorship System API in relation to POST /login,
so that I can represent the error message accordingly to both Mentorship System and Bridge In Tech users.

Mocks

NA

Acceptance Criteria

Update [Required]

  • [ ] 401: Unauthorized needs to be returned instead of 404: Not Found if the username and/or password is/are wrong

Enhancement to Update [Optional]

NA

Definition of Done

  • [ ] All of the required items are completed.
  • [ ] Approval by 1 mentor.

Estimation

1 hour

Coding Bug

All 10 comments

@mtreacy002 If this issue is open. Can I work on this one?

Yes @PareenKarpe

thanks, @PareenKarpe for helping with This issue 馃グ

sorry, accidentally hit closed button when trying to select emoji icon 馃槉

@mtreacy002 Sorry I started working on this issue late as I was working on another issue. I have changed the response type for the login post user service. Now I am getting a 401 response type as shown in the attached image.

image

Thank you, @PareenKarpe for your contribution. @anitab-org/bridgeintech-maintainers or @anitab-org/coding-team , can you please help review this PR? 馃槈

@mtreacy002 Sorry I started working on this issue late as I was working on another issue. I have changed the response type for the login post user service. Now I am getting a 401 response type as shown in the attached image.

image

Btw, @PareenKarpe , have you sent the PR? Or you're about to? Don't forget to tag this issue in the PR you're going to open so we're aware.

@mtreacy002 I will raise the PR now. I want to confirm that do we need to do it for any other service other than the Post method of Login User Service?

@PareenKarpe, sorry for the late response and thanks for picking up this issue.

For POST methods other than POST /login user service, I've opened separate issues to distribute the tasks into smaller ones so it won't burden one contributor to do all required changes in one issue. Once you've finished with this, feel free to work on the other similar ones on different PR (once @anitab-org/coding-team assign you to one). Thanks again for your contribution 馃槈

@PareenKarpe, sorry for the late response and thanks for picking up this issue.

For POST methods other than POST /login user service, I've opened separate issues to distribute the tasks into smaller ones so it won't burden one contributor to do all required changes in one issue. Once you've finished with this, feel free to work on the other similar ones on different PR (once @anitab-org/coding-team assign you to one). Thanks again for your contribution 馃槈

Thank you for your help throughout 馃憤

Was this page helpful?
0 / 5 - 0 ratings