servus 0.1.2 → 0.1.4
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/.yardopts +6 -0
- data/CHANGELOG.md +8 -1
- data/IDEAS.md +5 -0
- data/READme.md +147 -42
- data/Rakefile +33 -0
- data/builds/servus-0.1.2.gem +0 -0
- data/builds/servus-0.1.3.gem +0 -0
- data/builds/servus-0.1.4.gem +0 -0
- data/docs/core/1_overview.md +77 -0
- data/docs/core/2_architecture.md +92 -0
- data/docs/core/3_service_objects.md +121 -0
- data/docs/features/1_schema_validation.md +119 -0
- data/docs/features/2_error_handling.md +121 -0
- data/docs/features/3_async_execution.md +81 -0
- data/docs/features/4_logging.md +64 -0
- data/docs/guides/1_common_patterns.md +90 -0
- data/docs/guides/2_migration_guide.md +175 -0
- data/docs/integration/1_configuration.md +51 -0
- data/docs/integration/2_testing.md +164 -0
- data/docs/integration/3_rails_integration.md +99 -0
- data/docs/yard/Servus/Base.html +1645 -0
- data/docs/yard/Servus/Config.html +582 -0
- data/docs/yard/Servus/Extensions/Async/Call.html +400 -0
- data/docs/yard/Servus/Extensions/Async/Errors/AsyncError.html +140 -0
- data/docs/yard/Servus/Extensions/Async/Errors/JobEnqueueError.html +154 -0
- data/docs/yard/Servus/Extensions/Async/Errors/ServiceNotFoundError.html +154 -0
- data/docs/yard/Servus/Extensions/Async/Errors.html +128 -0
- data/docs/yard/Servus/Extensions/Async/Ext.html +119 -0
- data/docs/yard/Servus/Extensions/Async/Job.html +310 -0
- data/docs/yard/Servus/Extensions/Async.html +141 -0
- data/docs/yard/Servus/Extensions.html +117 -0
- data/docs/yard/Servus/Generators/ServiceGenerator.html +261 -0
- data/docs/yard/Servus/Generators.html +115 -0
- data/docs/yard/Servus/Helpers/ControllerHelpers.html +457 -0
- data/docs/yard/Servus/Helpers.html +115 -0
- data/docs/yard/Servus/Railtie.html +134 -0
- data/docs/yard/Servus/Support/Errors/AuthenticationError.html +287 -0
- data/docs/yard/Servus/Support/Errors/BadRequestError.html +283 -0
- data/docs/yard/Servus/Support/Errors/ForbiddenError.html +284 -0
- data/docs/yard/Servus/Support/Errors/InternalServerError.html +283 -0
- data/docs/yard/Servus/Support/Errors/NotFoundError.html +284 -0
- data/docs/yard/Servus/Support/Errors/ServiceError.html +489 -0
- data/docs/yard/Servus/Support/Errors/ServiceUnavailableError.html +290 -0
- data/docs/yard/Servus/Support/Errors/UnauthorizedError.html +200 -0
- data/docs/yard/Servus/Support/Errors/UnprocessableEntityError.html +288 -0
- data/docs/yard/Servus/Support/Errors/ValidationError.html +200 -0
- data/docs/yard/Servus/Support/Errors.html +140 -0
- data/docs/yard/Servus/Support/Logger.html +856 -0
- data/docs/yard/Servus/Support/Rescuer/BlockContext.html +585 -0
- data/docs/yard/Servus/Support/Rescuer/CallOverride.html +257 -0
- data/docs/yard/Servus/Support/Rescuer/ClassMethods.html +343 -0
- data/docs/yard/Servus/Support/Rescuer.html +267 -0
- data/docs/yard/Servus/Support/Response.html +574 -0
- data/docs/yard/Servus/Support/Validator.html +1150 -0
- data/docs/yard/Servus/Support.html +119 -0
- data/docs/yard/Servus/Testing/ExampleBuilders.html +523 -0
- data/docs/yard/Servus/Testing/ExampleExtractor.html +578 -0
- data/docs/yard/Servus/Testing.html +142 -0
- data/docs/yard/Servus.html +343 -0
- data/docs/yard/_index.html +535 -0
- data/docs/yard/class_list.html +54 -0
- data/docs/yard/css/common.css +1 -0
- data/docs/yard/css/full_list.css +58 -0
- data/docs/yard/css/style.css +503 -0
- data/docs/yard/file.1_common_patterns.html +154 -0
- data/docs/yard/file.1_configuration.html +115 -0
- data/docs/yard/file.1_overview.html +142 -0
- data/docs/yard/file.1_schema_validation.html +188 -0
- data/docs/yard/file.2_architecture.html +157 -0
- data/docs/yard/file.2_error_handling.html +190 -0
- data/docs/yard/file.2_migration_guide.html +242 -0
- data/docs/yard/file.2_testing.html +227 -0
- data/docs/yard/file.3_async_execution.html +145 -0
- data/docs/yard/file.3_rails_integration.html +160 -0
- data/docs/yard/file.3_service_objects.html +191 -0
- data/docs/yard/file.4_logging.html +135 -0
- data/docs/yard/file.ErrorHandling.html +190 -0
- data/docs/yard/file.READme.html +674 -0
- data/docs/yard/file.architecture.html +157 -0
- data/docs/yard/file.async_execution.html +145 -0
- data/docs/yard/file.common_patterns.html +154 -0
- data/docs/yard/file.configuration.html +115 -0
- data/docs/yard/file.error_handling.html +190 -0
- data/docs/yard/file.logging.html +135 -0
- data/docs/yard/file.migration_guide.html +242 -0
- data/docs/yard/file.overview.html +142 -0
- data/docs/yard/file.rails_integration.html +160 -0
- data/docs/yard/file.schema_validation.html +188 -0
- data/docs/yard/file.service_objects.html +191 -0
- data/docs/yard/file.testing.html +227 -0
- data/docs/yard/file_list.html +119 -0
- data/docs/yard/frames.html +22 -0
- data/docs/yard/index.html +674 -0
- data/docs/yard/js/app.js +344 -0
- data/docs/yard/js/full_list.js +242 -0
- data/docs/yard/js/jquery.js +4 -0
- data/docs/yard/method_list.html +542 -0
- data/docs/yard/top-level-namespace.html +110 -0
- data/lib/generators/servus/service/service_generator.rb +64 -1
- data/lib/generators/servus/service/templates/service.rb.erb +1 -1
- data/lib/servus/base.rb +258 -57
- data/lib/servus/config.rb +58 -12
- data/lib/servus/extensions/async/call.rb +50 -18
- data/lib/servus/extensions/async/errors.rb +23 -3
- data/lib/servus/extensions/async/ext.rb +10 -2
- data/lib/servus/extensions/async/job.rb +32 -11
- data/lib/servus/helpers/controller_helpers.rb +73 -37
- data/lib/servus/support/errors.rb +135 -45
- data/lib/servus/support/rescuer.rb +189 -36
- data/lib/servus/support/response.rb +49 -7
- data/lib/servus/support/validator.rb +120 -19
- data/lib/servus/testing/example_builders.rb +133 -0
- data/lib/servus/testing/example_extractor.rb +309 -0
- data/lib/servus/testing.rb +17 -0
- data/lib/servus/version.rb +1 -1
- metadata +118 -19
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Exception: Servus::Support::Errors::ServiceUnavailableError
|
|
8
|
+
|
|
9
|
+
— Servus | Service Object Framework
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Servus::Support::Errors::ServiceUnavailableError";
|
|
19
|
+
relpath = '../../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../../_index.html">Index (S)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../Servus.html" title="Servus (module)">Servus</a></span></span> » <span class='title'><span class='object_link'><a href="../../Support.html" title="Servus::Support (module)">Support</a></span></span> » <span class='title'><span class='object_link'><a href="../Errors.html" title="Servus::Support::Errors (module)">Errors</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">ServiceUnavailableError</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Exception: Servus::Support::Errors::ServiceUnavailableError
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">StandardError</li>
|
|
78
|
+
|
|
79
|
+
<li class="next"><span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></li>
|
|
80
|
+
|
|
81
|
+
<li class="next">Servus::Support::Errors::ServiceUnavailableError</li>
|
|
82
|
+
|
|
83
|
+
</ul>
|
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
85
|
+
|
|
86
|
+
</dd>
|
|
87
|
+
</dl>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<dl>
|
|
100
|
+
<dt>Defined in:</dt>
|
|
101
|
+
<dd>lib/servus/support/errors.rb</dd>
|
|
102
|
+
</dl>
|
|
103
|
+
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<h2>Overview</h2><div class="docstring">
|
|
107
|
+
<div class="discussion">
|
|
108
|
+
<p>Represents a 503 Service Unavailable error.</p>
|
|
109
|
+
|
|
110
|
+
<p>Use this error when a service dependency is temporarily unavailable.</p>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="tags">
|
|
116
|
+
|
|
117
|
+
<div class="examples">
|
|
118
|
+
<h4 class="tag_title">Examples:</h4>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<h5 class="example_title"><div class='inline'><p>Using with rescue_from</p>
|
|
122
|
+
</div></h5>
|
|
123
|
+
|
|
124
|
+
<pre class="example code"><code><span class='kw'>class</span> <span class='const'>MyService</span> <span class='op'><</span> <span class='const'><span class='object_link'><a href="../../../Servus.html" title="Servus (module)">Servus</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Base.html" title="Servus::Base (class)">Base</a></span></span>
|
|
125
|
+
<span class='id identifier rubyid_rescue_from'>rescue_from</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPError</span><span class='comma'>,</span> <span class='label'>use:</span> <span class='const'>ServiceUnavailableError</span>
|
|
126
|
+
|
|
127
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
|
128
|
+
<span class='id identifier rubyid_make_external_api_call'>make_external_api_call</span>
|
|
129
|
+
<span class='kw'>end</span>
|
|
130
|
+
<span class='kw'>end</span></code></pre>
|
|
131
|
+
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<h2>
|
|
138
|
+
Constant Summary
|
|
139
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
140
|
+
</h2>
|
|
141
|
+
|
|
142
|
+
<dl class="constants">
|
|
143
|
+
|
|
144
|
+
<dt id="DEFAULT_MESSAGE-constant" class="">DEFAULT_MESSAGE =
|
|
145
|
+
|
|
146
|
+
</dt>
|
|
147
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Service unavailable</span><span class='tstring_end'>'</span></span></pre></dd>
|
|
148
|
+
|
|
149
|
+
</dl>
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<h2>Instance Attribute Summary</h2>
|
|
158
|
+
|
|
159
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></h3>
|
|
160
|
+
<p class="inherited"><span class='object_link'><a href="ServiceError.html#message-instance_method" title="Servus::Support::Errors::ServiceError#message (method)">#message</a></span></p>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<h2>
|
|
165
|
+
Instance Method Summary
|
|
166
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
167
|
+
</h2>
|
|
168
|
+
|
|
169
|
+
<ul class="summary">
|
|
170
|
+
|
|
171
|
+
<li class="public ">
|
|
172
|
+
<span class="summary_signature">
|
|
173
|
+
|
|
174
|
+
<a href="#api_error-instance_method" title="#api_error (instance method)">#<strong>api_error</strong> ⇒ Hash </a>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
</span>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
<span class="summary_desc"><div class='inline'><p>API error response with :service_unavailable code.</p>
|
|
189
|
+
</div></span>
|
|
190
|
+
|
|
191
|
+
</li>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
</ul>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></h3>
|
|
207
|
+
<p class="inherited"><span class='object_link'><a href="ServiceError.html#initialize-instance_method" title="Servus::Support::Errors::ServiceError#initialize (method)">#initialize</a></span></p>
|
|
208
|
+
|
|
209
|
+
<div id="constructor_details" class="method_details_list">
|
|
210
|
+
<h2>Constructor Details</h2>
|
|
211
|
+
|
|
212
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="ServiceError.html#initialize-instance_method" title="Servus::Support::Errors::ServiceError#initialize (method)">Servus::Support::Errors::ServiceError</a></span></p>
|
|
213
|
+
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
<div id="instance_method_details" class="method_details_list">
|
|
218
|
+
<h2>Instance Method Details</h2>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<div class="method_details first">
|
|
222
|
+
<h3 class="signature first" id="api_error-instance_method">
|
|
223
|
+
|
|
224
|
+
#<strong>api_error</strong> ⇒ <tt>Hash</tt>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
</h3><div class="docstring">
|
|
231
|
+
<div class="discussion">
|
|
232
|
+
<p>Returns API error response with :service_unavailable code.</p>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="tags">
|
|
238
|
+
|
|
239
|
+
<p class="tag_title">Returns:</p>
|
|
240
|
+
<ul class="return">
|
|
241
|
+
|
|
242
|
+
<li>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
—
|
|
250
|
+
<div class='inline'><p>API error response with :service_unavailable code</p>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
</li>
|
|
254
|
+
|
|
255
|
+
</ul>
|
|
256
|
+
|
|
257
|
+
</div><table class="source_code">
|
|
258
|
+
<tr>
|
|
259
|
+
<td>
|
|
260
|
+
<pre class="lines">
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
220
|
|
264
|
+
221
|
|
265
|
+
222</pre>
|
|
266
|
+
</td>
|
|
267
|
+
<td>
|
|
268
|
+
<pre class="code"><span class="info file"># File 'lib/servus/support/errors.rb', line 220</span>
|
|
269
|
+
|
|
270
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_api_error'>api_error</span>
|
|
271
|
+
<span class='lbrace'>{</span> <span class='label'>code:</span> <span class='symbol'>:service_unavailable</span><span class='comma'>,</span> <span class='label'>message:</span> <span class='id identifier rubyid_message'>message</span> <span class='rbrace'>}</span>
|
|
272
|
+
<span class='kw'>end</span></pre>
|
|
273
|
+
</td>
|
|
274
|
+
</tr>
|
|
275
|
+
</table>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<div id="footer">
|
|
283
|
+
Generated on Fri Nov 21 00:33:24 2025 by
|
|
284
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
285
|
+
0.9.37 (ruby-3.4.4).
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
</div>
|
|
289
|
+
</body>
|
|
290
|
+
</html>
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Exception: Servus::Support::Errors::UnauthorizedError
|
|
8
|
+
|
|
9
|
+
— Servus | Service Object Framework
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Servus::Support::Errors::UnauthorizedError";
|
|
19
|
+
relpath = '../../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../../class_list.html?1"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../../_index.html">Index (U)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../Servus.html" title="Servus (module)">Servus</a></span></span> » <span class='title'><span class='object_link'><a href="../../Support.html" title="Servus::Support (module)">Support</a></span></span> » <span class='title'><span class='object_link'><a href="../Errors.html" title="Servus::Support::Errors (module)">Errors</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">UnauthorizedError</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="content"><h1>Exception: Servus::Support::Errors::UnauthorizedError
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</h1>
|
|
67
|
+
<div class="box_info">
|
|
68
|
+
|
|
69
|
+
<dl>
|
|
70
|
+
<dt>Inherits:</dt>
|
|
71
|
+
<dd>
|
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="AuthenticationError.html" title="Servus::Support::Errors::AuthenticationError (class)">AuthenticationError</a></span></span>
|
|
73
|
+
|
|
74
|
+
<ul class="fullTree">
|
|
75
|
+
<li>Object</li>
|
|
76
|
+
|
|
77
|
+
<li class="next">StandardError</li>
|
|
78
|
+
|
|
79
|
+
<li class="next"><span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></li>
|
|
80
|
+
|
|
81
|
+
<li class="next"><span class='object_link'><a href="AuthenticationError.html" title="Servus::Support::Errors::AuthenticationError (class)">AuthenticationError</a></span></li>
|
|
82
|
+
|
|
83
|
+
<li class="next">Servus::Support::Errors::UnauthorizedError</li>
|
|
84
|
+
|
|
85
|
+
</ul>
|
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
87
|
+
|
|
88
|
+
</dd>
|
|
89
|
+
</dl>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<dl>
|
|
102
|
+
<dt>Defined in:</dt>
|
|
103
|
+
<dd>lib/servus/support/errors.rb</dd>
|
|
104
|
+
</dl>
|
|
105
|
+
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<h2>Overview</h2><div class="docstring">
|
|
109
|
+
<div class="discussion">
|
|
110
|
+
<p>Represents a 401 Unauthorized error (alias for AuthenticationError).</p>
|
|
111
|
+
|
|
112
|
+
<p>Use this error for authorization failures when credentials are valid but
|
|
113
|
+
lack sufficient permissions.</p>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="tags">
|
|
119
|
+
|
|
120
|
+
<div class="examples">
|
|
121
|
+
<h4 class="tag_title">Examples:</h4>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<pre class="example code"><code><span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span>
|
|
125
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access denied</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>UnauthorizedError</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_admin?'>admin?</span>
|
|
126
|
+
<span class='kw'>end</span></code></pre>
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<h2>
|
|
134
|
+
Constant Summary
|
|
135
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
136
|
+
</h2>
|
|
137
|
+
|
|
138
|
+
<dl class="constants">
|
|
139
|
+
|
|
140
|
+
<dt id="DEFAULT_MESSAGE-constant" class="">DEFAULT_MESSAGE =
|
|
141
|
+
|
|
142
|
+
</dt>
|
|
143
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Unauthorized</span><span class='tstring_end'>'</span></span></pre></dd>
|
|
144
|
+
|
|
145
|
+
</dl>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
<h2>Instance Attribute Summary</h2>
|
|
154
|
+
|
|
155
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></h3>
|
|
156
|
+
<p class="inherited"><span class='object_link'><a href="ServiceError.html#message-instance_method" title="Servus::Support::Errors::ServiceError#message (method)">#message</a></span></p>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<h2>Method Summary</h2>
|
|
167
|
+
|
|
168
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="AuthenticationError.html" title="Servus::Support::Errors::AuthenticationError (class)">AuthenticationError</a></span></h3>
|
|
169
|
+
<p class="inherited"><span class='object_link'><a href="AuthenticationError.html#api_error-instance_method" title="Servus::Support::Errors::AuthenticationError#api_error (method)">#api_error</a></span></p>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="ServiceError.html" title="Servus::Support::Errors::ServiceError (class)">ServiceError</a></span></h3>
|
|
180
|
+
<p class="inherited"><span class='object_link'><a href="ServiceError.html#api_error-instance_method" title="Servus::Support::Errors::ServiceError#api_error (method)">#api_error</a></span>, <span class='object_link'><a href="ServiceError.html#initialize-instance_method" title="Servus::Support::Errors::ServiceError#initialize (method)">#initialize</a></span></p>
|
|
181
|
+
|
|
182
|
+
<div id="constructor_details" class="method_details_list">
|
|
183
|
+
<h2>Constructor Details</h2>
|
|
184
|
+
|
|
185
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="ServiceError.html#initialize-instance_method" title="Servus::Support::Errors::ServiceError#initialize (method)">Servus::Support::Errors::ServiceError</a></span></p>
|
|
186
|
+
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<div id="footer">
|
|
193
|
+
Generated on Fri Nov 21 00:33:24 2025 by
|
|
194
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
195
|
+
0.9.37 (ruby-3.4.4).
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
</div>
|
|
199
|
+
</body>
|
|
200
|
+
</html>
|