handle H_UNKNOWN error

see also schildbach/public-transport-enabler#0f6862f
This commit is contained in:
Jannis R 2019-10-28 17:35:55 +01:00
parent 2993cc0e87
commit 43b4a6e6d9
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -7,6 +7,12 @@ const SERVER_ERROR = 'SERVER_ERROR'
// https://gist.github.com/derhuerst/79d49c0f04c1c192a5d15756e5af575f/edit
const byErrorCode = Object.assign(Object.create(null), {
H_UNKNOWN: {
isServer: false,
code: SERVER_ERROR,
message: 'unknown internal error',
statusCode: 500,
},
AUTH: {
isClient: true,
code: ACCESS_DENIED,