Mentorship-backend: Fix: refactor HTTP error codes PUT /mentorship_relation/{request_id}/task/{task_id}/complete

Created on 4 Jun 2020  路  19Comments  路  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 PUT /mentorship_relation/{request_id}/task/{task_id}/complete,
so that I can represent the error message accordingly to both Mentorship System and Bridge In Tech users.

Mocks

NA

Acceptance Criteria

Update [Required]

  • [ ] 409: Conflict need to be returned instead of 400: Bad Request if the task was already achieved

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 19 comments

can i work on it?

@nandini45 Are you available to work on this?

yes @vj-codes sorry for the late comment

Assigning you @nandini45
Happy coding!

@vj-codes i am working on it.
need some time..a little caught with my other work

@nandini45 hows the PR going?

my laptop broke down
i need time to assemble back.
you can assign it to someone else

@divyanshugit Do you want to work on this issue? This issue gives you an overview of the project flow.

@PrashanthPuneriya Yes, I would love to work on this issue !!

Assigned you this issue @divyanshugit . Looking forward for your PR :)

@divyanshugit hey how's the PR going?

@vj-codes , @PrashanthPuneriya Now the task API is changed to HTTPstatus.FORBIDDEN (in #682). Do I still need to change it to 403:FORBIDDEN to 409:CONFLICT?

@divyanshugit To my knowledge #682 has no impact on this issue. You still need to refactor the status code to 409:Conflict. May be I am wrong. What's the reasoning behind this question?

@PrashanthPuneriya I mean in file app/api/dao/task.py:
Screenshot (192)
Do I need to change the HTTPstatus.FORBIDDEN to HTTPstatus.CONFLICT?

Yes! You need to change every related piece of code. Since, you got this doubt I would suggest you to read this wiki to understand more about the codebase.

@PrashanthPuneriya is this an OSH issue?

No! I don't think so @vj-codes

I would like to work on this :)

Update changes done will send a PR tomr

Was this page helpful?
0 / 5 - 0 ratings