Skip to content

JsonConvertException: ageRestriction field missing after Komga 1.24.4 API change #303

@visualmethod

Description

@visualmethod

Describe the bug

After upgrading Komga to version 1.24.4, komf fails to connect and throws a deserialization error when fetching the current user from the Komga API.

Error message:
JsonConvertException: Illegal input: Field 'ageRestriction' is required for type with serial name 'snd.komga.client.user.KomgaUser', but it was missing at path: $

Root cause

Komga 1.24.4 introduced the following change (see their changelog):

omit UserDto.ageRestriction instead of returning null

Previously, the API returned "ageRestriction": null. Now the field is omitted entirely from the response. komf's KomgaUser model has ageRestriction as a required field with no default, so deserialization
fails when the field is absent.

Steps to reproduce

  1. Run komf latest (1.7.1) against Komga 1.24.4
  2. Attempt to connect to Komga from komf's web UI
  3. Observe the JsonConvertException above

Expected behavior

komf should handle a missing ageRestriction field gracefully (e.g. by making it nullable or providing a default value).

Environment

  • komf version: 1.7.1 (latest)
  • Komga version: 1.24.4
  • Workaround: pinning Komga to 1.24.3 restores functionality

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions