BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c53b599e
Unverified
Commit
c53b599e
authored
Aug 02, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retain old behavior
parent
6320a83a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
api.rb
lib/api/api.rb
+4
-2
No files found.
lib/api/api.rb
View file @
c53b599e
...
...
@@ -7,8 +7,10 @@ module API
rack_response
({
'message'
=>
'404 Not found'
}.
to_json
,
404
)
end
rescue_from
Grape
::
Exceptions
::
ValidationErrors
do
|
e
|
error!
({
messages:
e
.
full_messages
},
400
)
# Retain 405 error rather than a 500 error for Grape 0.15.0+.
# See: https://github.com/ruby-grape/grape/commit/252bfd27c320466ec3c0751812cf44245e97e5de
rescue_from
Grape
::
Exceptions
::
Base
do
|
e
|
error!
e
.
message
,
e
.
status
,
e
.
headers
end
rescue_from
:all
do
|
exception
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment