Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uppy-s3_multipart
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
uppy-s3_multipart
Commits
353e3641
Unverified
Commit
353e3641
authored
Dec 08, 2018
by
Janko Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract returning error response to #error!
parent
72c210d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app.rb
lib/uppy/s3_multipart/app.rb
+6
-2
No files found.
lib/uppy/s3_multipart/app.rb
View file @
353e3641
...
...
@@ -80,7 +80,7 @@ module Uppy
begin
{
part_number:
part
.
fetch
(
"PartNumber"
),
etag:
part
.
fetch
(
"ETag"
)
}
rescue
KeyError
r
.
halt
400
,
{
error:
"At least one part is missing
\"
PartNumber
\"
or
\"
ETag
\"
field"
}
error!
"At least one part is missing
\"
PartNumber
\"
or
\"
ETag
\"
field"
end
end
...
...
@@ -115,10 +115,14 @@ module Uppy
def
param!
(
name
)
value
=
request
.
params
[
name
]
request
.
halt
400
,
{
error:
"Missing
\"
#{
name
}
\"
parameter"
}
if
value
.
nil?
error!
"Missing
\"
#{
name
}
\"
parameter"
if
value
.
nil?
value
end
def
error!
(
message
)
request
.
halt
400
,
{
error:
message
}
end
end
end
end
...
...
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