mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 12:19:14 +02:00
feat:#39 added error check
This commit is contained in:
@@ -94,6 +94,11 @@ func FetchAllResources(app *pocketbase.PocketBase) ([]*models.Record, error) {
|
||||
eventUrl := apiUrl + "veranstaltungen"
|
||||
parsedEvents, err := parseEvents(eventUrl, client)
|
||||
|
||||
if err != nil {
|
||||
slog.Error("Error while fetching events", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
slog.Info("Fetched events: " + strconv.Itoa(len(parsedEvents.Events)) + " of " + strconv.Itoa(parsedEvents.TotalItems))
|
||||
|
||||
return insertedGroups, nil
|
||||
|
Reference in New Issue
Block a user