class RDF::LDP::RequestError

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.

Constants

STATUS

Public Instance Methods

headers() click to toggle source
# 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() click to toggle source
# File lib/rdf/ldp.rb, line 49
def status
  self.class::STATUS
end