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

Ensure Consistent 400 Response for Invalid Input in Kolibri Public Content APIs with Studio #12807

Closed
3 tasks
ozer550 opened this issue Nov 7, 2024 · 8 comments · Fixed by #12818
Closed
3 tasks
Assignees
Labels
DEV: backend Python, databases, networking, filesystem... good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome P1 - important Priority: High impact on UX

Comments

@ozer550
Copy link
Member

ozer550 commented Nov 7, 2024

Description

Currently, the Kolibri public content APIs, specifically retrieve function of ContentNodeTreeViewset and ImportMetadataViewset handle invalid input by returning a 404 response. To ensure consistent API behavior across Kolibri and Studio, we need to update these views to handle invalid input in a way that aligns with the implementation in Studio.

Tasks:

  • Update the retrieve function of ContentNodeTreeViewset and ImportMetadataViewset to return 400 when there is a bad input.
  • Update test for TreeViewset.
  • Write new test to ensure the same for ImportMetadataViewset.

Expected Outcome:

  • Consistency in behavior across APIs.

References:

We would want to refactor similar to this PR.

@ozer550 ozer550 added DEV: backend Python, databases, networking, filesystem... P1 - important Priority: High impact on UX labels Nov 7, 2024
@ozer550 ozer550 changed the title Ensure Kolibri Public Content APIs Return 400 for Invalid Input Ensure Consistent 400 Response for Invalid Input in Kolibri Public Content APIs with Studio Nov 7, 2024
@ozer550 ozer550 added help wanted Open source contributors welcome good first issue Self-contained, straightforward, low-complexity labels Nov 7, 2024
@manzil-infinity180
Copy link
Contributor

can I take this issue?

@AllanOXDi
Copy link
Member

AllanOXDi commented Nov 8, 2024

Hi @manzil-infinity180, Sure you can! I have assigned it to you. Thanks for contributing

@ozer550
Copy link
Member Author

ozer550 commented Nov 8, 2024

Feel free to ask any questions you have on the way @manzil-infinity180 :)

@rajRishi22
Copy link

Sir , I know that this issue has already been assign but can i work together to solve this problem ?

@manzil-infinity180
Copy link
Contributor

manzil-infinity180 commented Nov 10, 2024

Hello @rajRishi22 , I have already solved this issue I will raise pr in some following day. You can take a look at some other issues with no assignee
Thank you

@rajRishi22
Copy link

Hello @manzil-infinity180 , I will look into other issues.

@qmhqmhqmhqmh
Copy link

can I take this issue?

@MisRob
Copy link
Member

MisRob commented Nov 15, 2024

Hi @qmhqmhqmhqmh, thanks for volunteering! It's best to always preview whether an issue has an assignee or no. This one is already taken and even has a pull request linked.

There are other contributing opportunities in several repositories. See the contributing guidelines including links to issues suitable for contribution for each repository here:

You can also see the list of unassigned "help wanted" or "good first issue" issues across all repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem... good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome P1 - important Priority: High impact on UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants