ably / ably-js

Javascript, Node, Typescript, React, React Native client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
316 stars 55 forks source link

Most ErrorInfos are created with numeric literals #820

Open owenpearson opened 3 years ago

owenpearson commented 3 years ago

These will be a lot more expressive if we create an enum with appropriate names for error codes.

┆Issue is synchronized with this Jira Task by Unito

vodolaz095 commented 3 years ago

as far as i understand, error codes are loaded from protocol definitions already in

https://github.com/ably/ably-common/blob/ca89c9d8d5f2cdef40546cbc704b4e5052c94b06/protocol/errors.json

So, does this task is to make ErrorInfo function https://github.com/ably/ably-js/blob/d0d0bca390254e8f28a4c4b98f08ccf79aafdf86/common/lib/types/errorinfo.js#L3 provide text output of error code description from protocols definition file?