- .then(response => response.json())
- .catch(error => {
- console.error('Error at fetching app configuration:', error)
- throw error
- })
- .then(config => {
- initializeApp(config)
+ .then(response => {
+ if (!response.ok) {
+ // TODO: add code for UI notifications or other error handling logic
+ console.error('Failed to fetch app configuration')
+ return
+ }
+ response
+ .json()
+ .then(config => {
+ initializeApp(config)
+ })
+ .catch(error => {
+ // TODO: add code for UI notifications or other error handling logic
+ console.error('Error at app configuration JSON deserialization:', error)
+ })