typesense 0.11.0 → 0.11.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: 47b1bddb975dd2055704e6184451e05a2e9fd05585021068f788610963044ebd
4
- data.tar.gz: 326c4515546569fdc3bc01b5681369aa75a1242ae112f1e7f40b36320ec56d20
3
+ metadata.gz: ff00b5a30813dd1e6ea053ee9f602ba3216a08a7e1b22858a8c8bdba289a65bf
4
+ data.tar.gz: 74f2987e407bea8f2b2424e8f620c98516db16750de2d9104b7a3f9bd56cec8e
5
5
  SHA512:
6
- metadata.gz: 64918475f966d9fdc1625c25a5e6c9273dc88a71ca8b3cbe3fed2d4387cc58c694fc0d6285588c55c960353e3bf2782df3ef36ff4e1cccd4633d47740b81f482
7
- data.tar.gz: d9f8381fba8ffcfa82034fe5f62d3f176a7a8485876848ea75dd2cfde7798483a909c756acc5670ae18fd876f6bc570943ccc986d56e5816fa7f6abc8f1b645f
6
+ metadata.gz: f7352da49cddd9e1ade9cee9e1d9df1b6ab211b5f728e5da7b4d61bd5bb83349e3cdd209e28bd813df9d528086589f0bac6f87aac9a4cc9cf4d7760b527dbddc
7
+ data.tar.gz: 1e90c09b1a1c73a3ff29e1a8f0349daccba142e18b470639d88ad09bd05449d793eb123b2154ffb8dd99abd89f0db7cb3f89dff305bcf697ce2c5bc51697d0a7
@@ -177,23 +177,23 @@ module Typesense
177
177
 
178
178
  def custom_exception_klass_for(response)
179
179
  if response.code == 400
180
- Typesense::Error::RequestMalformed
180
+ Typesense::Error::RequestMalformed.new(response: response)
181
181
  elsif response.code == 401
182
- Typesense::Error::RequestUnauthorized
182
+ Typesense::Error::RequestUnauthorized.new(response: response)
183
183
  elsif response.code == 404
184
- Typesense::Error::ObjectNotFound
184
+ Typesense::Error::ObjectNotFound.new(response: response)
185
185
  elsif response.code == 409
186
- Typesense::Error::ObjectAlreadyExists
186
+ Typesense::Error::ObjectAlreadyExists.new(response: response)
187
187
  elsif response.code == 422
188
- Typesense::Error::ObjectUnprocessable
188
+ Typesense::Error::ObjectUnprocessable.new(response: response)
189
189
  elsif response.code >= 500 && response.code <= 599
190
- Typesense::Error::ServerError
190
+ Typesense::Error::ServerError.new(response: response)
191
191
  elsif response.timed_out?
192
- Typesense::Error::TimeoutError
192
+ Typesense::Error::TimeoutError.new(response: response)
193
193
  elsif response.code.zero?
194
- Typesense::Error::HTTPStatus0Error
194
+ Typesense::Error::HTTPStatus0Error.new(response: response)
195
195
  else
196
- Typesense::Error::HTTPError
196
+ Typesense::Error::HTTPError.new(response: response)
197
197
  end
198
198
  end
199
199
 
@@ -2,6 +2,14 @@
2
2
 
3
3
  module Typesense
4
4
  class Error < StandardError
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+
10
+ super
11
+ end
12
+
5
13
  class MissingConfiguration < Error
6
14
  end
7
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Typesense
4
- VERSION = '0.11.0'
4
+ VERSION = '0.11.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typesense
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Typesense, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print