api06: fix syntax errors.

This commit is contained in:
Gabriel Ebner 2008-05-13 12:27:38 +00:00
parent 7151fa05e4
commit 2ff2cdf63d

View file

@ -10,7 +10,9 @@ module OSM
# The base class for API Errors.
class APIError < RuntimeError
def render_opts { :text => "", :status => :internal_server_error } end
def render_opts
{ :text => "", :status => :internal_server_error }
end
end
# Raised when an API object is not found.
@ -19,12 +21,16 @@ module OSM
# Raised when a precondition to an API action fails sanity check.
class APIPreconditionFailedError < APIError
def render_opts { :text => "", :status => :precondition_failed } end
def render_opts
{ :text => "", :status => :precondition_failed }
end
end
# Raised when to delete an already-deleted object.
class APIAlreadyDeletedError < APIError
def render_opts { :text => "", :status => :gone } end
def render_opts
{ :text => "", :status => :gone }
end
end
# Raised when the provided version is not equal to the latest in the db.