Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<!-- This file is generated, please add to it using `knope document-change` in the client-library-templates repo -->
# Changelog

## 4.20.1 (2026-10-13)

### Fixes

#### Fix crash on string error bodies and unrecognised error types

Error responses whose `error` is a plain string, with a status other than 400, 401, 403 or 429 (for example a 404 or 422), previously raised `NoMethodError: undefined method 'to_sym' for nil` instead of a GoCardless error. They now raise `GoCardlessPro::ApiError` with the message from the response.

Error responses with an unrecognised `type` now also raise `GoCardlessPro::ApiError` instead of `KeyError`.

`code` is now set to the HTTP status for string error bodies. It was previously `nil`.

## 4.20.0 (2026-10-12)

### Features
Expand Down
2 changes: 1 addition & 1 deletion lib/gocardless_pro/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def default_options
'User-Agent' => "#{user_agent}",
'Content-Type' => 'application/json',
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
'GoCardless-Client-Version' => '4.20.0',
'GoCardless-Client-Version' => '4.20.1',
},
}
end
Expand Down
2 changes: 1 addition & 1 deletion lib/gocardless_pro/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module GoCardlessPro

module GoCardlessPro
# Current version of the GC gem
VERSION = '4.20.0'
VERSION = '4.20.1'
end
Loading