Improve logging for API errors

Created on 31 August 2023, 10 months ago

Problem/Motivation

currently when the API returns an http response different from 200 (201 for POST) or 302, the htt[ response body is simply logged as info message, without any additional context.

This clearly lacks context and additional information, at the very least having the response code would be helpful.

Steps to reproduce

N/A

Proposed resolution

  • Add request URL, response code and other useful information.
  • Perhaps use php exceptions in case of 50x errors returned from the api?
  • Log 40x/50x as warning instead of notices

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡΄Norway esolitos Trondheim

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

Comments & Activities

Production build 0.69.0 2024