add sentry

This commit is contained in:
2024-09-11 10:53:48 +02:00
parent 093d18a3a1
commit fc1c985d20
7 changed files with 1143 additions and 91 deletions

View File

@@ -32,7 +32,10 @@ export class VacanciesService {
}
async getKeywords(): Promise<KeywordsResponse> {
return await fetch(`${this.baseUrl}/vacancies/keywords`).then(res => res.json())
return await fetch(`${this.baseUrl}/vacancies/keywords`).then(res => {
if (!res.ok) throw new Error('Failed to fetch keywords')
return res.json()
})
}
private formatDateOnData(data: VacancyData): VacancyData {