MagiCircles / MagiCircles/SchoolIdolAPI

Invalid Search Paths and Missing/Corrupted Cards

Open
#357 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
151
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I noticed that the path https://schoolido.lu/api/cards/?search=&page=7&name=Sakurauchi+Riko&rarity=ur gives me an error:
![image](https://user-images.githubusercontent.com/2175256/194991487-5953ff18-0ae1-441e-b2c1-677243f2554d.png)

While at first thought, I would assume it is just does not exist, it seems that the search page before and after it (pages 6 and 8) both exist and each refer to the erroring page 7 as either the next or previous page respectively.

https://schoolido.lu/api/cards/?search=&page=6&name=Sakurauchi+Riko&rarity=ur
![image](https://user-images.githubusercontent.com/2175256/194991748-02b63027-c259-4396-99b2-2e333b1ff5d0.png)

https://schoolido.lu/api/cards/?search=&page=8&name=Sakurauchi+Riko&rarity=ur
![image](https://user-images.githubusercontent.com/2175256/194991778-37f028ff-6d53-4b05-a24d-646c5793fa74.png)

I suspect that this issue is related to corrupted or missing cards, such as #3604. Though, ideally it should just return a null value for a card instead of breaking the entire search.
https://schoolido.lu/api/cards/3604/ (This page also fails like above).
![image](https://user-images.githubusercontent.com/2175256/194992371-ec609824-8242-4d8c-908f-d719904c5398.png)

The cards that I have noticed to be broken are 3604, 3605, 3640, and 3641.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failing paginated search URLs and the individual /api/cards/3604/ endpoint, then inspect how the API handles cards 3604, 3605, 3640, and 3641. Done means the affected search pages and individual card endpoints no longer fail when cards are missing or corrupted, while preserving the surrounding pagination behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.