api-guard icon indicating copy to clipboard operation
api-guard copied to clipboard

fixed unauthorizedResponse

Open sebzap opened this issue 6 years ago • 0 comments

during the upgrade from 3.* to 4.* the unauthorised response changed from

[
    'error' => [
        'code' => 'GEN-UNAUTHORIZED',
        'http_code' => 401,
        'message' => 'Unauthorized'
    ]
]

to

[
    'error' => [
        'code' => '401',
        'http_code' => 'GEN-UNAUTHORIZED',
        'message' => 'Unauthorized.'
    ]
]

However it makes more sense that 401 is the http_code not code (and also an int) (The upgrade also added a . at the end of the message, which is IMHO a valid change)

sebzap avatar Sep 02 '19 09:09 sebzap