Page 1 of 1

[Mod Portal][HTTP API] /api/mods returns HTTP 500 for sort=updated_at&sort_order=desc

Posted: Fri Jul 24, 2026 1:07 am
by mokkosu55
The Mod Portal HTTP API /api/mods (Mod List) appears to return an internal server error (500) when sort=updated_at and sort_order=desc are used together.

Reproduction

Request:

Code: Select all

https://mods.factorio.com/api/mods?sort=updated_at&sort_order=desc
Expected result:
  • HTTP 200
  • List of mods sorted by updated_at in descending order.
Actual result:
  • HTTP 500 Internal Server Error
Comparison

The following requests work correctly (HTTP 200):

Code: Select all

https://mods.factorio.com/api/mods
https://mods.factorio.com/api/mods?sort=updated_at
https://mods.factorio.com/api/mods?sort=updated_at&sort_order=asc
https://mods.factorio.com/api/mods?sort=created_at&sort_order=desc
The issue seems to occur only when sort=updated_at is combined with sort_order=desc.

Additional context

I have a daily scheduled job that requests the following endpoint:

Code: Select all

https://mods.factorio.com/api/mods?sort=updated_at&sort_order=desc&version=2.0&page=1&page_size=100
This request has been working without any issues until yesterday.

The HTTP 500 error occurred for the first time during today's scheduled run at 2026-07-23T22:44:20Z.

Re: [Mod Portal][HTTP API] /api/mods returns HTTP 500 for sort=updated_at&sort_order=desc

Posted: Sat Jul 25, 2026 2:43 am
by cyx2020f
Likely caused by this mod with 2882 dependencies: https://mods.factorio.com/api/mods/khaosdata-extractor
The api works fine if the result doesn't contain this mod