Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
ruby-passwordstate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LiU IT - Infrastructure
ruby-passwordstate
Commits
b62e14bb
Verified
Commit
b62e14bb
authored
6 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Support authorization error as 302
parent
8ae589cf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/passwordstate/errors.rb
+5
-0
5 additions, 0 deletions
lib/passwordstate/errors.rb
with
5 additions
and
0 deletions
lib/passwordstate/errors.rb
+
5
−
0
View file @
b62e14bb
...
...
@@ -23,6 +23,11 @@ module Passwordstate
errtype
||=
ClientError
if
code_i
>=
400
&&
code_i
<
500
errtype
||=
ServerError
if
code_i
>=
500
&&
code_i
<
600
if
code_i
==
302
&&
res
[
'location'
].
start_with?
(
'/error/generalerror.aspx?'
)
errtype
||=
ServerError
errors
=
[{
'phrase'
=>
'Response code 302, most likely meaning an authorization error'
}]
end
errtype
||=
HTTPError
errtype
.
new
(
code_i
,
req
,
res
,
errors
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment