lib/ury_rapid/server/helpers/error.rb
def wrap
          yield
        rescue Kankri::InsufficientPrivilegeError
          error(403, 'Forbidden.')
        rescue Common::Exceptions::MissingResource
          error(404, 'Not found.')
        rescue Common::Exceptions::NotSupported => e
          not_supported(e)
        end
# Wraps a block in various common error handlers
Wraps a block in various common error handlers
Wraps a block in various common error handlers
def wrap
          yield
        rescue Kankri::InsufficientPrivilegeError
          error(403, 'Forbidden.')
        rescue Common::Exceptions::MissingResource
          error(404, 'Not found.')
        rescue Common::Exceptions::NotSupported => e
          not_supported(e)
        end
def wrap yield rescue Kankri :: InsufficientPrivilegeError error ( 403 , 'Forbidden.' ) rescue Common :: Exceptions :: MissingResource error ( 404 , 'Not found.' ) rescue Common :: Exceptions :: NotSupported => e not_supported ( e ) end
Wraps a block in various common error handlers
Wraps a block in various common error handlers