class JsonapiErrorsHandler::Errors::Unauthorized
Handles serialization of Unauthorized
HTTP error (401 status code)
Public Class Methods
new(message: nil)
click to toggle source
Calls superclass method
JsonapiErrorsHandler::Errors::StandardError::new
# File lib/jsonapi_errors_handler/errors/unauthorized.rb, line 8 def initialize(message: nil) super( title: 'Unauthorized', status: 401, detail: message || 'You need to login to authorize this request.', source: { pointer: '/request/headers/authorization' } ) end