Docs / Errors

DONATION_CAMPAIGN_NOT_FOUND

404Donation campaign not found

Why it happens

The masjid exists but runs no default donation campaign right now. Campaigns start and end: this is a normal answer, not a failure.

What to do

  • Read hasDonationCampaign on the masjid first, and only call GET /v1/masjids/{id}/donation-campaign when it is true.
  • Hide the donation part of your screen rather than show an error.

Example response

http
HTTP/1.1 404
{
  "type": "https://hub.masjidbox.com/docs/errors/DONATION_CAMPAIGN_NOT_FOUND",
  "title": "Donation campaign not found",
  "status": 404,
  "detail": "The masjid runs no default donation campaign right now.",
  "instance": "/v1/masjids/msj_abc123defg",
  "code": "DONATION_CAMPAIGN_NOT_FOUND",
  "requestId": "req_8f14e45fceea167a5a36dedd4bea2543",
  "requestLogUrl": "https://hub.masjidbox.com/console/logs/req_8f14e45fceea167a5a36dedd4bea2543"
}