Resizing Hetzner volumes doesn't work #455

Closed
opened 2024-02-06 16:49:28 +02:00 by inex · 1 comment

Expected Behavior

Volume extends when requested

Actual Behavior

Hetzner responds with 422 error, Unprocessable Entity.

Request uri: https://api.hetzner.cloud/v1/volumes/[SERVER_ID]/actions/resize
Method: POST
Content type: [application/json]

Request body:

{"size":12.0}

Response body:

{
  "error": {
    "code": "json_error",
    "message": "can not read request body",
    "details": {}
  }
}

Steps to Reproduce

  1. Have a deployed server on Hetzner
  2. Try to extend the volume

Context and notes

No response

Relevant log output

[ +773 ms] I/flutter (20536): 
[        ] I/flutter (20536): ╔╣ DioError ║ Status: 422 Unprocessable Entity
[        ] I/flutter (20536): ║  https://api.hetzner.cloud/v1/volumes/100293644/actions/resize
[        ] I/flutter (20536): ╚══════════════════════════════════════════════════════════════════════════════════════════╝
[        ] I/flutter (20536): ╔ DioExceptionType.badResponse
[        ] I/flutter (20536): ║    {
[        ] I/flutter (20536): ║         error: {
[        ] I/flutter (20536): ║             code: "json_error",
[        ] I/flutter (20536): ║             message: "can not read request body",
[        ] I/flutter (20536): ║             details: {}
[        ] I/flutter (20536): ║        }
[        ] I/flutter (20536): ║    }
[        ] I/flutter (20536): ╚══════════════════════════════════════════════════════════════════════════════════════════╝
[        ] I/flutter (20536): 
[   +2 ms] I/flutter (20536): /volumes/100293644/actions/resize
[        ] I/flutter (20536): {size: 12.0}
[        ] I/flutter (20536): This exception was thrown because the response has a status code of 422 and RequestOptions.validateStatus was configured to throw for this status code.
[        ] I/flutter (20536): The status code of 422 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
[        ] I/flutter (20536): Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
[        ] I/flutter (20536): In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.
[        ] I/flutter (20536): {"error":{"code":"json_error","message":"can not read request body","details":{}}}
[        ] I/flutter (20536): DioException [bad response]: This exception was thrown because the response has a status code of 422 and RequestOptions.validateStatus was configured to throw for this status code.
[        ] I/flutter (20536): The status code of 422 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
[        ] I/flutter (20536): Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
[        ] I/flutter (20536): In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.
[log] DioException [bad response]: This exception was thrown because the response has a status code of 422 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 422 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.

App Version

0.10.0

Server API Version

3.0.0

Operating System

Android

### Expected Behavior Volume extends when requested ### Actual Behavior Hetzner responds with 422 error, `Unprocessable Entity`. Request uri: `https://api.hetzner.cloud/v1/volumes/[SERVER_ID]/actions/resize` Method: `POST` Content type: `[application/json]` Request body: ```json {"size":12.0} ``` Response body: ```json { "error": { "code": "json_error", "message": "can not read request body", "details": {} } } ``` ### Steps to Reproduce 1. Have a deployed server on Hetzner 2. Try to extend the volume ### Context and notes _No response_ ### Relevant log output ```shell [ +773 ms] I/flutter (20536): [ ] I/flutter (20536): ╔╣ DioError ║ Status: 422 Unprocessable Entity [ ] I/flutter (20536): ║ https://api.hetzner.cloud/v1/volumes/100293644/actions/resize [ ] I/flutter (20536): ╚══════════════════════════════════════════════════════════════════════════════════════════╝ [ ] I/flutter (20536): ╔ DioExceptionType.badResponse [ ] I/flutter (20536): ║ { [ ] I/flutter (20536): ║ error: { [ ] I/flutter (20536): ║ code: "json_error", [ ] I/flutter (20536): ║ message: "can not read request body", [ ] I/flutter (20536): ║ details: {} [ ] I/flutter (20536): ║ } [ ] I/flutter (20536): ║ } [ ] I/flutter (20536): ╚══════════════════════════════════════════════════════════════════════════════════════════╝ [ ] I/flutter (20536): [ +2 ms] I/flutter (20536): /volumes/100293644/actions/resize [ ] I/flutter (20536): {size: 12.0} [ ] I/flutter (20536): This exception was thrown because the response has a status code of 422 and RequestOptions.validateStatus was configured to throw for this status code. [ ] I/flutter (20536): The status code of 422 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled" [ ] I/flutter (20536): Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status [ ] I/flutter (20536): In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code. [ ] I/flutter (20536): {"error":{"code":"json_error","message":"can not read request body","details":{}}} [ ] I/flutter (20536): DioException [bad response]: This exception was thrown because the response has a status code of 422 and RequestOptions.validateStatus was configured to throw for this status code. [ ] I/flutter (20536): The status code of 422 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled" [ ] I/flutter (20536): Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status [ ] I/flutter (20536): In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code. [log] DioException [bad response]: This exception was thrown because the response has a status code of 422 and RequestOptions.validateStatus was configured to throw for this status code. The status code of 422 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled" Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code. ``` ### App Version 0.10.0 ### Server API Version 3.0.0 ### Operating System Android
inex added the
Bug
Priority
Critical
Severity
High
Providers
Hetzner
Source
Core Team
labels 2024-02-06 16:49:55 +02:00
Poster
Owner

Looks like we're passing a double instead of the int

Looks like we're passing a `double` instead of the `int`
inex closed this issue 2024-02-07 12:47:41 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy.org.app#455
There is no content yet.