class JsonapiErrorsHandler::Errors::Unauthorized

Handles serialization of Unauthorized HTTP error (401 status code)

Public Class Methods

new(message: nil) click to toggle source
# 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