Class: Ros::FailureApp

Inherits:
Object
  • Object
show all
Defined in:
lib/ros/core.rb

Overview

Failure response to return JSONAPI error message when authentication failse

Class Method Summary collapse

Class Method Details

.call(env) ⇒ Object



53
54
55
56
57
58
59
60
61
# File 'lib/ros/core.rb', line 53

def self.call(env)
  [
    '401',
    { 'Content-Type' => 'application/vnd.api+json' },
    [
      { errors: [{ status: '401', title: 'Unauthorized' }] }.to_json
    ]
  ]
end