Class: Rails::Couchbase::Railtie

Inherits:
Railtie
  • Object
show all
Defined in:
lib/couchbase-orm/railtie.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.rescue_responsesHash

Maping of rescued exceptions to HTTP responses

Examples:

railtie.rescue_responses

Returns:

  • (Hash)

    rescued responses



36
37
38
39
40
41
42
43
# File 'lib/couchbase-orm/railtie.rb', line 36

def self.rescue_responses
    {
        'Libcouchbase::Error::KeyNotFound' => :not_found,
        'Libcouchbase::Error::NotStored' => :unprocessable_entity,
        Libcouchbase::Error::KeyNotFound => :not_found,
        Libcouchbase::Error::NotStored => :unprocessable_entity
    }
end