Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

fix: mismatch between number of campuses in database and API resulting to an error #516

@42atomys

Description

@42atomys

Describe the bug

An error generated: campus not found is raised during the execution of the webhooks-processor. This error is undesirable as we crawl all campuses each week.
Upon investigation, it was discovered that there is a mismatch between the number of campuses in our production database and the number returned by the API. The production database contains 51 campuses, while the API returns 69. The cause of this mismatch is currently unknown.

Investigating and resolving this mismatch is crucial to ensure the accuracy and reliability of the data in our system. The mismatch leads to the campus not found error during the webhooks-processor, which could potentially impact other functionalities.

To Reproduce

  1. Run the command go run main.go jobs crawler campus
  2. Observe the discrepancy between the number of campuses returned by the API and the number inserted into the database.

Expected behavior

The data between the API and our database should match.

Relevant log output

10:25PM INF Start the crawling of all campus of 42 network version=v0.30
10:25PM DBG Requesting https://api.intra.42.fr/v2/campus?per_page=100 version=v0.30

... TRUNC DATA DUE TO PRIVATE INFORMATION ...

10:37PM INF Successfully imported 51 campus version=v0.30

Version of software

v0.30

Environment

Live (https://s42.app)

Additional context

Error Message: generated: campus not found
Link to Discord message from monitoring

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    aspect/backend 💻Concerns the backend code in the repositorydomain/complicated 🟨The relationship between cause and effect requires analysis or expertisegood first issueGood for newcomerspriority/medium 🟨Priority 3 - Not blocking but should be fixed soonstale/lock 🔒This prevent slote process on this objecttype/bug 🔥Something isn't working

    Projects

    Status

    Confirmed/To Do💜

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions