glia-errors 0.5.1 → 0.6.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.
- checksums.yaml +4 -4
- data/glia-errors.gemspec +1 -1
- data/lib/glia/errors/client_errors.rb +13 -13
- 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: 65d627db5f7496b55539268de587762316d8d138ea0548ecd7abb5c7968fb4b1
|
|
4
|
+
data.tar.gz: f0894efd36f5e3013d9f3892e922ea5b7007e3a271595a262e9e97534d90923f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03af1bfefb0087f78f4ddfabe4575980167f03df92fc0aba83052a1aaed18a936b60b53b3d442deb1676f85007b47a9c86772f0581fc63e425417ec3c22235d7
|
|
7
|
+
data.tar.gz: dac6e22cc50535689a445ae0616c73b362bfdf75af9daf81c4d11f54034f7233da72e3bf00f1c4a203e649227b223e2d37025db91aa83d8e3dd22ca8474b1be3
|
data/glia-errors.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ module Glia
|
|
|
19
19
|
super(
|
|
20
20
|
type: INVALID_NUMBER_ERROR,
|
|
21
21
|
ref: "https://example.com/errors/#{INVALID_NUMBER_ERROR}.html",
|
|
22
|
-
message: "#{humanize(field)}
|
|
22
|
+
message: message || "#{humanize(field)} value is invalid"
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -29,7 +29,7 @@ module Glia
|
|
|
29
29
|
super(
|
|
30
30
|
type: INVALID_VALUE_ERROR,
|
|
31
31
|
ref: "https://example.com/errors/#{INVALID_VALUE_ERROR}.html",
|
|
32
|
-
message: "#{humanize(field)}
|
|
32
|
+
message: message || "#{humanize(field)} value is invalid"
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
end
|
|
@@ -39,7 +39,7 @@ module Glia
|
|
|
39
39
|
super(
|
|
40
40
|
type: INVALID_LENGTH_ERROR,
|
|
41
41
|
ref: "https://example.com/errors/#{INVALID_LENGTH_ERROR}.html",
|
|
42
|
-
message: "#{humanize(field)}
|
|
42
|
+
message: message || "#{humanize(field)} length is invalid"
|
|
43
43
|
)
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -58,7 +58,7 @@ module Glia
|
|
|
58
58
|
super(
|
|
59
59
|
type: INVALID_FORMAT_ERROR,
|
|
60
60
|
ref: "https://example.com/errors/#{INVALID_FORMAT_ERROR}.html",
|
|
61
|
-
message: "#{humanize(field)} "
|
|
61
|
+
message: message || "#{humanize(field)} #{default_message}"
|
|
62
62
|
)
|
|
63
63
|
end
|
|
64
64
|
end
|
|
@@ -77,7 +77,7 @@ module Glia
|
|
|
77
77
|
super(
|
|
78
78
|
type: INVALID_TYPE_ERROR,
|
|
79
79
|
ref: "https://example.com/errors/#{INVALID_TYPE_ERROR}.html",
|
|
80
|
-
message: "#{humanize(field)}
|
|
80
|
+
message: message || "#{humanize(field)} must be of type #{type}",
|
|
81
81
|
error_details: { type: type }
|
|
82
82
|
)
|
|
83
83
|
end
|
|
@@ -88,7 +88,7 @@ module Glia
|
|
|
88
88
|
super(
|
|
89
89
|
type: MISSING_VALUE_ERROR,
|
|
90
90
|
ref: "https://example.com/errors/#{MISSING_VALUE_ERROR}.html",
|
|
91
|
-
message: "#{humanize(field)}
|
|
91
|
+
message: message || "#{humanize(field)} is missing"
|
|
92
92
|
)
|
|
93
93
|
end
|
|
94
94
|
end
|
|
@@ -98,7 +98,7 @@ module Glia
|
|
|
98
98
|
super(
|
|
99
99
|
type: UNKNOWN_ERROR,
|
|
100
100
|
ref: "https://example.com/errors/#{UNKNOWN_ERROR}.html",
|
|
101
|
-
message: "#{humanize(field)}
|
|
101
|
+
message: message || "#{humanize(field)} validation failed with unknown error"
|
|
102
102
|
)
|
|
103
103
|
end
|
|
104
104
|
end
|
|
@@ -110,7 +110,7 @@ module Glia
|
|
|
110
110
|
super(
|
|
111
111
|
type: RESOURCE_NOT_FOUND_ERROR,
|
|
112
112
|
ref: "https://example.com/errors/#{RESOURCE_NOT_FOUND_ERROR}.html",
|
|
113
|
-
message: "#{humanize(resource)}
|
|
113
|
+
message: message || "#{humanize(resource)} not found",
|
|
114
114
|
error_details: { resource: resource }
|
|
115
115
|
)
|
|
116
116
|
end
|
|
@@ -123,7 +123,7 @@ module Glia
|
|
|
123
123
|
super(
|
|
124
124
|
type: NOT_VERIFIED_ERROR,
|
|
125
125
|
ref: "https://example.com/errors/#{NOT_VERIFIED_ERROR}.html",
|
|
126
|
-
message: "#{humanize(resource)}
|
|
126
|
+
message: message || "#{humanize(resource)} is not verified",
|
|
127
127
|
error_details: { resource: resource }
|
|
128
128
|
)
|
|
129
129
|
end
|
|
@@ -141,7 +141,7 @@ module Glia
|
|
|
141
141
|
super(
|
|
142
142
|
type: REMAINING_ASSOCIATION_ERROR,
|
|
143
143
|
ref: "https://example.com/errors/#{REMAINING_ASSOCIATION_ERROR}.html",
|
|
144
|
-
message: "#{humanize(resource)} "
|
|
144
|
+
message: message || "#{humanize(resource)} #{default_message}",
|
|
145
145
|
error_details: { resource: resource, associated_resource: associated_resource }
|
|
146
146
|
)
|
|
147
147
|
end
|
|
@@ -154,7 +154,7 @@ module Glia
|
|
|
154
154
|
super(
|
|
155
155
|
type: LIMIT_EXCEEDED_ERROR,
|
|
156
156
|
ref: "https://example.com/errors/#{LIMIT_EXCEEDED_ERROR}.html",
|
|
157
|
-
message: "#{humanize(resource)}
|
|
157
|
+
message: message || "#{humanize(resource)} count must not exceed #{max}",
|
|
158
158
|
error_details: { resource: resource, max: max }
|
|
159
159
|
)
|
|
160
160
|
end
|
|
@@ -167,7 +167,7 @@ module Glia
|
|
|
167
167
|
super(
|
|
168
168
|
type: RESOURCE_ALREADY_EXISTS_ERROR,
|
|
169
169
|
ref: "https://example.com/errors/#{RESOURCE_ALREADY_EXISTS_ERROR}.html",
|
|
170
|
-
message: "#{humanize(resource)}
|
|
170
|
+
message: message || "#{humanize(resource)} already exists",
|
|
171
171
|
error_details: { resource: resource }
|
|
172
172
|
)
|
|
173
173
|
end
|
|
@@ -181,7 +181,7 @@ module Glia
|
|
|
181
181
|
super(
|
|
182
182
|
type: INVALID_RESOURCE_STATE_ERROR,
|
|
183
183
|
ref: "https://example.com/errors/#{INVALID_RESOURCE_STATE_ERROR}.html",
|
|
184
|
-
message: "#{humanize(resource)}
|
|
184
|
+
message: message || "#{humanize(resource)} is in invalid state: #{state}",
|
|
185
185
|
error_details: { resource: resource, state: state }
|
|
186
186
|
)
|
|
187
187
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glia-errors
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Glia TechMovers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-03-
|
|
11
|
+
date: 2021-03-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: ''
|
|
14
14
|
email:
|