error_response 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/error_response.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc3fa7849140a231dbc285ef371838efe21a45ec99ae156524a0f54bef763300
|
4
|
+
data.tar.gz: e586365e16c38a5283dd20949d173262710cc1f04102b2e5a5da313a5ae524ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c32d812b6815bae358426cec75d0e5f6bb8872e05e282de3bc43a3c0d0be6c38e72ce99cf1de4df5bd8177cd9a64cbf77db93817a93f7230d13dc9606d9a4b
|
7
|
+
data.tar.gz: 553814f93c8bfdb03149f4eaf76c9fbe5b39307eab899941b56f5d840c6ae2044b9c08035ed0036dbc7d6d4f4b504cd5ed9d263cdd30732f8bc46e607d11c74b
|
data/lib/error_response.rb
CHANGED
@@ -3,7 +3,7 @@ class ErrorResponse
|
|
3
3
|
YAML_PATH = 'config/error_response.yml'
|
4
4
|
|
5
5
|
def self.to_api(key, message=nil)
|
6
|
-
err_json = yaml_hash[key.to_s]
|
6
|
+
err_json = yaml_hash[key.to_s]&.dup
|
7
7
|
if err_json.nil?
|
8
8
|
err_json = {'error_code' => 500000, 'error_message' => message}
|
9
9
|
elsif !message.nil?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: error_response
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jameslee
|
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
38
|
requirements: []
|
39
|
-
rubygems_version: 3.0.
|
39
|
+
rubygems_version: 3.0.6
|
40
40
|
signing_key:
|
41
41
|
specification_version: 4
|
42
42
|
summary: A tool for API error response
|