class UnsupportedMediaTypeError < Error

Inherits from
Error

Raised when no parser accepts a media type.

Definitions

def initialize(media_type)

Initialize the error.

Signature

parameter media_type Protocol::Media::Type | Nil

The unsupported media type.

Implementation

def initialize(media_type)
	if media_type
		super("Unsupported media type: #{media_type}")
	else
		super("Missing media type!")
	end
	
	@media_type = media_type
end

attr :media_type

The unsupported media type, if one was provided.