api-guard
api-guard copied to clipboard
fixed unauthorizedResponse
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)