Module: S3Proxy::App::Errors

Defined in:
lib/s3_proxy/app.rb

Class Method Summary collapse

Class Method Details

.forbiddenObject



129
130
131
# File 'lib/s3_proxy/app.rb', line 129

def forbidden
  [403, {'Content-Type' => 'text/plain'}, ["forbidden"]]
end

.method_not_allowedObject



121
122
123
# File 'lib/s3_proxy/app.rb', line 121

def method_not_allowed
  [405, {'Content-Type' => 'text/plain'}, ["method not allowed"]]
end

.not_foundObject



125
126
127
# File 'lib/s3_proxy/app.rb', line 125

def not_found
  [404, {'Content-Type' => 'text/plain'}, ["not found"]]
end

.not_modifiedObject



137
138
139
# File 'lib/s3_proxy/app.rb', line 137

def not_modified
  [304, {'Content-Type' => 'text/plain'}, ["not modified"]]
end

.precondition_failedObject



133
134
135
# File 'lib/s3_proxy/app.rb', line 133

def precondition_failed
  [412, {'Content-Type' => 'text/plain'}, ["precondition failed"]]
end

.unknown(code) ⇒ Object



141
142
143
# File 'lib/s3_proxy/app.rb', line 141

def unknown(code)
  [code, {'Content-Type' => 'text/plain'}, ["Error: #{code}"]]
end