Skip to content

Crash when no network is available during startup

Description

When the app is started without any networking available, it will immediately crash.

Cause

The radioknop.nl integration does not handle exceptions if they occur, hence the Host not found exception causes the app to crash

Proposed solution

Add a try around the api call. An extended suggestion is to actually let the LaunchedEffect run in a loop to:

  • retry the fetch if an exception occurs
  • refetch the list once every 24 hours if the fetch is successful