nylas 6.2.2 → 6.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51dfbc5793db11f12c6f01c13040346b5ec3cb272e30e3464363240e3e8ebf00
4
- data.tar.gz: 3f76c739a761dfc92c8dfa12f71e0555e8d56399c61a297a7daeadfc861d019e
3
+ metadata.gz: cb37db614a1d3567334d0d7217d50e81a94a3d31bc758c916fa752953fc7369e
4
+ data.tar.gz: 123be60d4794edb9ea702ae62c2768d39fda98afa7b53157d3e7b53def4b3b98
5
5
  SHA512:
6
- metadata.gz: 77d860d38046bb599e43e7cc7b3460a20b512005d4fc4bb21704d7d1adbe5e5c81b5a01761f6050121b18bb68451d8e51f9f6e2b30c835ec6abc8d71f6cdb615
7
- data.tar.gz: 58fb6f352d89b3b24328da83d07f6f823e4eb77e5b1bd078069294600ec5cea538e095aa437aa18ae69893045e6510ff66e2f3719e59adae70bacf6246a73e54
6
+ metadata.gz: 4d26327e107d0a911397a30a8f2f2d2fc7836dcf8d9c4f9448b4ec8ab58aa2cd37595fa7cdcea8c5ade7643d6d9ec8b33451dbf297237501ce0834494946f331
7
+ data.tar.gz: 9340849392790c37b9c86334a97afe8b5b991c6d681313dee3158f26371953d698114bd38796e02f28c49e6de028594bfee4adae9b9e11d62d7e29cf10ccdb22
@@ -198,10 +198,24 @@ module Nylas
198
198
 
199
199
  def throw_error(response, status_code)
200
200
  error_obj = response[:error]
201
- provider_error = error_obj.fetch(:provider_error, nil)
202
201
 
203
- NylasApiError.new(error_obj[:type], error_obj[:message], status_code, provider_error,
204
- response[:request_id])
202
+ # If `error_obj` is just a string, turn it into a hash with default keys.
203
+ if error_obj.is_a?(String)
204
+ error_obj = {
205
+ type: "NylasApiError",
206
+ message: error_obj
207
+ }
208
+ end
209
+
210
+ provider_error = error_obj.fetch(:provider_error, nil) if error_obj.is_a?(Hash)
211
+
212
+ NylasApiError.new(
213
+ error_obj[:type],
214
+ error_obj[:message],
215
+ status_code,
216
+ provider_error,
217
+ response[:request_id]
218
+ )
205
219
  end
206
220
 
207
221
  # Adds query parameters to a URL.
data/lib/nylas/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nylas
4
- VERSION = "6.2.2"
4
+ VERSION = "6.2.3"
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nylas
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.2
4
+ version: 6.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nylas, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-02 00:00:00.000000000 Z
11
+ date: 2025-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: base64
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: mime-types
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -297,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
311
  - !ruby/object:Gem::Version
298
312
  version: '0'
299
313
  requirements: []
300
- rubygems_version: 3.5.22
314
+ rubygems_version: 3.4.18
301
315
  signing_key:
302
316
  specification_version: 4
303
317
  summary: Gem for interacting with the Nylas API