Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
folland87 committed Feb 21, 2025
1 parent 1c08a33 commit 9698786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jobs/sirene/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const fetchPage = async (endpoint, params, cursor) => {
const response = await fetch(url, { headers: API_KEY_HEADER });
await sleep(RATE_LIMIT_DELAY);

if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
console.log(`API Response Status: ${response.status}`);

const json = await response.json();

console.log(`API Response header: ${JSON.stringify(json.header, null, 2)}`);

if (json?.header?.statut !== 200 && json?.header?.statut !== 404) {
throw new Error(
JSON.stringify({
Expand Down

0 comments on commit 9698786

Please sign in to comment.