Response with status codes 4xx 5xx are not handled.

Created on 2 November 2020, about 4 years ago
Updated 25 February 2023, almost 2 years ago

Problem/Motivation

When third part API returns responce with status not equel 2xx modul is crashes.
For example ws.geonames.org is not avalible, so it returns error which is not handled.

Steps to reproduce

Install module, activate, adjust. Open page where plugin situated. Check logs.

Proposed resolution

1. Add handlers of 4xx and 5xx statuses to WeatherService class.
2. Add warning about free and non-free API-keys for openweather API on plugin config form.
2. Remove request to ws.geonames.org becouse it is not avalible. Get another one API that is avalible and has simmilar endpoints.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024