speakeasy_client_sdk_ruby 4.0.0 → 4.0.1

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: 44f27e3e09a07cc014a50265e1da6a0d87f0f31ff10748fa79c910bba8ca3329
4
- data.tar.gz: cf31e4ea81072802c9c823f01cf1f56ac49b74d8288ab74a207606debc91d61a
3
+ metadata.gz: 55476ab236195b620ce501e8be1c793299a26839c4f5420d401fb2d4185cf35b
4
+ data.tar.gz: edc2c9b7ad069fd3123893f4580987e257800e21756c9ea0ee6cd43640f71d95
5
5
  SHA512:
6
- metadata.gz: b33c3cc5fef52f6636ff17d3d69b78b6b05a00e75fc644193e69a633e7aaba3b6151defc70de7fd18ce7ae720624839784fb38e113cbffa847617c3be940d6e7
7
- data.tar.gz: 55beebeb06f55c89f42271c77da97d03be1875696a45001aeb341bd7c0c23dc19cba149b9b7f586efe5d026e0818dfb5e630c7b0ab33fc02d2fbd40d4d5ed9d1
6
+ metadata.gz: 84d9b1a2ad617d735f4079331207cedfff18667a4ef1645089ea8789a782abe19c9bcb360c6a3c4bf6dce2ca38f2d5c79a5faf0028e6104bc6f1c300efc8063d
7
+ data.tar.gz: 0070dfe5b7e9c4b8276773c62f98cd0835e4be072c7b250230e2bec4be288b1af47b69db5cabb55af0af5017e8cad797302db8bd07dddaaed333bc9845793cde
@@ -36,7 +36,7 @@ module SpeakeasyClientSDK
36
36
  req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
37
37
  headers['content-type'] = req_content_type
38
38
  raise StandardError, 'request body is required' if data.nil? && form.nil?
39
- headers['Accept'] = '*/*'
39
+ headers['Accept'] = 'application/json'
40
40
  headers['user-agent'] = @sdk_configuration.user_agent
41
41
 
42
42
  r = @sdk_configuration.client.post(url) do |req|
@@ -56,7 +56,13 @@ module SpeakeasyClientSDK
56
56
  res = ::SpeakeasyClientSDK::Operations::PostWorkspaceEventsResponse.new(
57
57
  status_code: r.status, content_type: content_type, raw_response: r
58
58
  )
59
-
59
+ if r.status >= 200 && r.status < 300
60
+ elsif r.status >= 500 && r.status < 600
61
+ if Utils.match_content_type(content_type, 'application/json')
62
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
63
+ res.error = out
64
+ end
65
+ end
60
66
  res
61
67
  end
62
68
  end
@@ -18,12 +18,15 @@ module SpeakeasyClientSDK
18
18
  # HTTP response status code for this operation
19
19
  field :status_code, ::Integer
20
20
 
21
+ field :error, T.nilable(::SpeakeasyClientSDK::Shared::Error)
21
22
 
22
- sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer).void }
23
- def initialize(content_type: nil, raw_response: nil, status_code: nil)
23
+
24
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error)).void }
25
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil)
24
26
  @content_type = content_type
25
27
  @raw_response = raw_response
26
28
  @status_code = status_code
29
+ @error = error
27
30
  end
28
31
  end
29
32
  end
@@ -41,9 +41,9 @@ module SpeakeasyClientSDK
41
41
  @globals = globals.nil? ? {} : globals
42
42
  @language = 'ruby'
43
43
  @openapi_doc_version = '0.4.0'
44
- @sdk_version = '4.0.0'
45
- @gen_version = '2.250.16'
46
- @user_agent = 'speakeasy-sdk/ruby 4.0.0 2.250.16 0.4.0 speakeasy_client_sdk_ruby'
44
+ @sdk_version = '4.0.1'
45
+ @gen_version = '2.250.21'
46
+ @user_agent = 'speakeasy-sdk/ruby 4.0.1 2.250.21 0.4.0 speakeasy_client_sdk_ruby'
47
47
  end
48
48
 
49
49
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speakeasy_client_sdk_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Speakeasy