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
Run the command go run main.go jobs crawler campus
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
Describe the bug
An error
generated: campus not found
is raised during the execution of thewebhooks-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
go run main.go jobs crawler campus
Expected behavior
The data between the API and our database should match.
Relevant log output
Version of software
v0.30
Environment
Live (https://s42.app)
Additional context
Error Message:
generated: campus not found
Link to Discord message from monitoringCode of Conduct