mihari 7.0.4 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,10 @@ module Mihari
8
8
  # @return [Boolean]
9
9
  attribute :error, Types::Bool
10
10
 
11
+ # @!attribute [r] errmsg
12
+ # @return [String, nil]
13
+ attribute? :errmsg, Types::String.optional
14
+
11
15
  # @!attribute [r] size
12
16
  # @return [Integer, nil]
13
17
  attribute? :size, Types::Int.optional
@@ -35,6 +39,7 @@ module Mihari
35
39
  def from_dynamic!(d)
36
40
  new(
37
41
  error: d.fetch("error"),
42
+ errmsg: d["errmsg"],
38
43
  size: d["size"],
39
44
  page: d["page"],
40
45
  mode: d["mode"],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mihari
4
- VERSION = "7.0.4"
4
+ VERSION = "7.1.0"
5
5
  end
@@ -36,7 +36,7 @@ module Mihari
36
36
 
37
37
  failure = result.failure
38
38
  case failure
39
- when Mihari::StatusCodeError
39
+ when Mihari::StatusError
40
40
  error!({ message: "IP:#{ip} not found" }, failure.status_code) if failure.status_code == 404
41
41
  error!({ message: "IP format invalid" }, failure.status_code) if failure.status_code == 422
42
42
  end