Skip to content

500 Internal Server Errors on specific books and major API sync issues #177

@rokibulroni

Description

@rokibulroni

Hello Sunnah.com Team, Assalamu Alaikum,

Thank you for your incredible work in making the Hadith collections accessible. While browsing and using the platform, I have encountered a few serious issues regarding broken pages on the website, as well as significant missing data in the official API.

I am listing the exact issues below so they can be investigated:

1. 500 Internal Server Error (Broken Pages)

When trying to read certain books within specific collections, the website completely crashes and returns a 500 Internal Server Error. The pages do not load at all.

Here are the exact URLs that are currently broken:

Steps to reproduce: Just open any of the links above in a web browser, and you will see the Cloudflare/Server 500 error page instead of the Hadith text.


2. API is Outdated and Missing Thousands of Hadiths

The official API (api.sunnah.com/v1/collections) seems to be severely outdated compared to the live website. If a developer uses the API, they miss out on a massive amount of data that is already published on your frontend.

A. Partially Missing Hadiths in API:
The /collections endpoint reports significantly lower totals than what is actually published on the website.

  • Sahih al-Bukhari (bukhari): Website has more hadiths; API only provides 7,167 (Missing ~110).
  • Jami' at-Tirmidhi (tirmidhi): API provides 3,975 (Missing ~78 compared to expected 4053).
  • Al-Adab Al-Mufrad (adab): API provides 1,185 (Missing ~141).
  • Mishkat al-Masabih (mishkat): API provides 5,015 (Missing ~304).

B. Completely Missing Collections in API:
The API returns totalAvailableHadith: 0 for many collections that are completely readable on the live website. Developers cannot fetch them via the API:

  • darimi (Sunan ad-Darimi)
  • ibnkhuzayma (Sahih Ibn Khuzayma)
  • ibnhibban (Sahih Ibn Hibban)
  • hakim (Mustadrak al-Hakim)
  • abdurrazzaq (Musannaf 'Abd ar-Razzaq)
  • ibnabishayba (Musannaf Ibn Abi Shayba)
  • daraqutni (Sunan ad-Daraqutni)
  • bayhaqi (Sunan al-Kubra lil-Bayhaqi)
  • nasaikubra (Sunan al-Kubra an-Nasai)
  • nawawi40 (40 Hadith Nawawi)
  • virtues (100 Virtues)

Expected Behavior:

  1. The 500 error pages for Hakim, Abdur Razzaq, and Ibn Abi Shayba should load the hadiths correctly.
  2. The official API endpoints should be synchronized with the live website database so that all hadiths and new collections are accessible via API.

Thank you very much for looking into these issues. Jazakumullahu Khairan!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions