Skip to content

[9.2.0] Strings of integers are incorrectly parsed as integers #420

Closed

Description

@diareuse

Repro

api.createPlaylist(userId, "2025")
    .description("2025")
    .build()
    .execute()

Acceptance criteria

IF the playlist doesn't exist THEN creates a brand new playlist with the given name ELSE fails with API error.

Actual

Playlist fails to create as the argument of name and description are parsed as integers in the request body which in turn is not parseable by the Spotify API prevalidator and fails the request.


Notes

Custom Gson wrapper does not take in account the input types which can under some circumstances fail to serialize the body. I'd argue that parsing integer from string in this context is rarely needed and if it's need it should require the input type to be an integer as not to guess the actual type (which it does obviously wrong).

Tested versions

Previously Used: 8.4.1 ✅
Currently Used: 9.2.0 ❌

Activity

  1. dargmuesli commented on Jul 23, 2025

    @dargmuesli
    Member

    Should be released as 9.3.0 🎉 please tell me if you can use that version without any problems as the artifact host needed some migrations.

  2. diareuse commented on Jul 23, 2025

    @diareuse
    Author

    All good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions