Skip to content

Fail to parse a 422 answer when scaling an app #1213

@EtienneM

Description

@EtienneM

Scale an application to 30 containers and you get the error:

 scalingo --app my-app scale web:30:M
 !     An error occurred:
       request to scale the application failed: fail to parse JSON of request POST https://api.osc-fr1.scalingo.com/v1/apps/nginx-modsecurity/scale: json: cannot unmarshal array into Go struct field UnprocessableEntity.errors of type string

I'm pretty sure the fix should be in go-scalingo.

If I execute the command with the prefix DEBUG=1, we can see the answer from the API:

[...]
[DEBUG]2026/04/14 09:53:15 [API] POST https://api.osc-fr1.scalingo.com/v1/apps/my-app/scale
[DEBUG]2026/04/14 09:53:15       User Agent: Scalingo CLI v1.43.3
[DEBUG]2026/04/14 09:53:15       Headers: map[User-Agent:[Scalingo CLI v1.43.3]]
[DEBUG]2026/04/14 09:53:15       Params: &{[{ web 30  M}]}
[DEBUG]2026/04/14 09:53:16       Request ID: a0d9196e-9f48-4fe9-a3e3-95a1e708b74a
[DEBUG]2026/04/14 09:53:16       Duration: 113.112287ms
[DEBUG]2026/04/14 09:53:16 APIRequest Error: [422] POST https://api.osc-fr1.scalingo.com/v1/apps/my-app/scale
[DEBUG]2026/04/14 09:53:16 {"errors":{"container-web-amount":[["can't scale over 10 containers, contact us at support@scalingo.com if you need more"]]}}

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions