Exception: RDF::LDP::RequestError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- RDF::LDP::RequestError
- Defined in:
- lib/rdf/ldp.rb
Overview
A base class for HTTP request errors.
This and its subclasses are caught and handled by Rack::LDP middleware. When a ‘RequestError` is caught by server middleware, its `#status` can be used as a response code and `#headers` may be added to (or replace) the existing HTTP headers.
Direct Known Subclasses
BadRequest, Conflict, Gone, MethodNotAllowed, NotAcceptable, NotFound, PreconditionFailed, UnsupportedMediaType
Constant Summary collapse
- STATUS =
500
Instance Method Summary collapse
Instance Method Details
#headers ⇒ Object
53 54 55 56 57 |
# File 'lib/rdf/ldp.rb', line 53 def headers uri = 'https://github.com/no-reply/rdf-ldp/blob/master/CONSTRAINED_BY.md' { 'Link' => "<#{uri}>;rel=\"#{CONSTRAINED_BY}\"" } end |
#status ⇒ Object
49 50 51 |
# File 'lib/rdf/ldp.rb', line 49 def status self.class::STATUS end |