stream-chat-ruby 2.11.2 → 2.11.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: 2fe612ee0891b1f564057942d1f9ff74de3b1cf423dc3985e24ab45c87ef8687
4
- data.tar.gz: 8ea59fb71fcae04419b9a55d7466e3da2da8eee70d7fc1fccedd60037f5d7672
3
+ metadata.gz: 8c930a4ce8f695581d1dbf0eb027fc94433a2bdf126cf626ef243dd7c78b572c
4
+ data.tar.gz: dcbe225ab70ddb6088bb7a8478e003ddcb6fb2d4a53fd9e113137257bc6464ce
5
5
  SHA512:
6
- metadata.gz: 164fb93106e15822aa2bb1a7561b2f5e24bcb94b09782851dfefbf0a05584b15d3a07a4190403c26a31e251f6b9b9d2ebd6c2853312a253a7dcad6ddd3f430cc
7
- data.tar.gz: 1e2a0b04c1eac20184c68d24dd10554acb064b61f2d732341184747131721e8f3dd74a6455e7acf958313af1be076c33bdc414f382e4b8d7932c1acb45a06ac8
6
+ metadata.gz: 70346465f94bf6d84ffb0d98d5852f27bfd5a17dcb349238f19e7398fcb3061bbb10c3e3eedd62ff65b1c2a1158cb267903ec4fda9a4cfae5d3aa77ce31d3eff
7
+ data.tar.gz: 61aa20fe924e7a16f454593c223b4abcbf78d4bcbe1e7443876ca7194d64f9167e826f47a856276cf1fbef68be86868ed3d3ad6003692054c9d5e811cc770c59
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## October 22nd, 2021 - 2.11.3
2
+
3
+ - Don't log the entire response when creating exception
4
+ - Access error details through StreamAPIException class attr_readers
5
+
1
6
  ## October 5th, 2021 - 2.11.2
2
7
 
3
8
  - Add Codeowners file
@@ -4,10 +4,12 @@
4
4
 
5
5
  module StreamChat
6
6
  class StreamAPIException < StandardError
7
+ attr_reader :error_code
8
+ attr_reader :error_message
9
+
7
10
  def initialize(response)
8
11
  super()
9
12
  @response = response
10
- p response
11
13
  begin
12
14
  parsed_response = JSON.parse(response.body)
13
15
  @json_response = true
@@ -25,6 +27,14 @@ module StreamChat
25
27
  "StreamChat error HTTP code: #{@response.status}"
26
28
  end
27
29
  end
30
+
31
+ def json_response?
32
+ @json_response
33
+ end
34
+
35
+ def to_s
36
+ message
37
+ end
28
38
  end
29
39
 
30
40
  class StreamChannelException < StandardError; end
@@ -3,5 +3,5 @@
3
3
  # lib/version.rb
4
4
 
5
5
  module StreamChat
6
- VERSION = '2.11.2'
6
+ VERSION = '2.11.3'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream-chat-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.2
4
+ version: 2.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mircea Cosbuc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-05 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday