Skip to content

Default value of public_net in create server is invalid. #132

Description

@josiasmontag

The in 2.8.0 introduced default value of [] for public_net is invalid. It is rejected by the Hetzner API:

{
  "error" : {
    "message" : "invalid input in field 'public_net'",
    "code" : "invalid_input",
    "details" : {
      "fields" : [ {
        "name" : "public_net._schema",
        "messages" : [ "root must be an object" ]
      } ]
    }
  }
}

The public_net parameter should be completely omitted by default.

Bug introduced by commit: 48c8ccc

Activity

  1. eugenecooper commented on Jul 13, 2025

    @eugenecooper

    This (or very similar) issue still persits in v2.8.2 (and dev-master)
    The error message I get was a bit different though:

    {
      "error": {
        "code": "invalid_input",
        "message": "failed to parse json",
        "details": {
          "fields": [
            {
              "name": "public_net",
              "messages": [
                "cannot parse type array as createServerPublicNet"
              ]
            }
          ]
        }
      }
    }
    

    The solution proposed by @josiasmontag didn't work for me, so I made another PR #138 that fixes the problem.

  2. LKaemmerling commented on Jun 16, 2026

    @LKaemmerling
    Collaborator

    Fixed with #154

    thank you!

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

Metadata

Metadata

Assignees

No one assigned

    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