Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: invalid_input API errors may not return details #507

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

jooola
Copy link
Member

@jooola jooola commented Aug 9, 2024

The create uploaded certificate endpoint may return the following error:

{
  "error": {
    "code": "invalid_input",
    "message": "certificate must use larger key size"
  }
}

This change ensure that we do not get a json unmarshal error (unexpected end of json) while trying to parse a non-existing details data.

The create uploaded certificate endpoint may return the following error:

{
  "error": {
    "code": "invalid_input",
    "message": "certificate must use larger key size"
  }
}

This change ensure that we do not get a json unmarshal error (unexpected end of json) while trying to parse a non existing data.
@jooola jooola requested a review from a team as a code owner August 9, 2024 09:33
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.46%. Comparing base (60c5428) to head (19d70d9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #507   +/-   ##
=======================================
  Coverage   71.46%   71.46%           
=======================================
  Files          46       46           
  Lines        3935     3935           
=======================================
  Hits         2812     2812           
  Misses        710      710           
  Partials      413      413           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jooola jooola requested a review from apricote August 9, 2024 11:09
@apricote apricote added backport release-1.x Open PR against release-1.x with these changes after the PR is merged. Bug labels Aug 9, 2024
@jooola jooola merged commit ca78af2 into main Aug 9, 2024
6 checks passed
@jooola jooola deleted the fix-invalid-input-details branch August 9, 2024 13:01
github-actions bot pushed a commit that referenced this pull request Aug 9, 2024
The create uploaded certificate endpoint may return the following error:

```
{
  "error": {
    "code": "invalid_input",
    "message": "certificate must use larger key size"
  }
}
```

This change ensure that we do not get a json unmarshal error (unexpected
end of json) while trying to parse a non-existing details data.

(cherry picked from commit ca78af2)
jooola added a commit that referenced this pull request Aug 9, 2024
…ase-1.x] (#508)

The create uploaded certificate endpoint may return the following error:

```
{
  "error": {
    "code": "invalid_input",
    "message": "certificate must use larger key size"
  }
}
```

This change ensure that we do not get a json unmarshal error (unexpected
end of json) while trying to parse a non-existing details data.

---
Backport ca78af2 from #507.

BEGIN_COMMIT_OVERRIDE
fix: `invalid_input` API errors may not return details
END_COMMIT_OVERRIDE

Co-authored-by: Jonas L. <[email protected]>
jooola pushed a commit that referenced this pull request Aug 9, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.13.1](v2.13.0...v2.13.1)
(2024-08-09)


### Bug Fixes

* `invalid_input` API errors may not return details
([#507](#507))
([ca78af2](ca78af2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Sep 12, 2024
…3.1 (hetznercloud/fleeting-plugin-hetzner!104)

This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | require | patch | `v2.13.0` -> `v2.13.1` |

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary>

### [`v2.13.1`](https://github.com/hetznercloud/hcloud-go/releases/tag/v2.13.1)

[Compare Source](hetznercloud/hcloud-go@v2.13.0...v2.13.1)

##### Bug Fixes

-   `invalid_input` API errors may not return details ([#&#8203;507](hetznercloud/hcloud-go#507)) ([ca78af2](hetznercloud/hcloud-go@ca78af2))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMy4yIiwidXBkYXRlZEluVmVyIjoiMzguMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-1.x Open PR against release-1.x with these changes after the PR is merged. Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants