# Errors
Error happens when you doing socket requests and can be handled by event callback or when callback is omitted by event error. Both cases receive same format of error with those properties:
{
message: string
type: string
event?: string
}
# Common error types
bad_request- missing or invalid request paramsnot_allowed- operation is not allowed, resource is not allowednot_found- resource not foundmethod_not_allowed- requested method is not supportedauth_failure- provided authentication is invalid, bad token.unauthorized- connection was not authenticated.server_error- unexpected error on server (eg: database not working)
# Close socket after error
In some error server can decide to close connection to prevent of some unexpected behaviour.
unauthorized- Socket will be closed, but client automatically reconnect back.auth_failure- Socket will be closed and reconnect is not allowed. In case of this error you must for example fix auth token, update in client and then connect again.
← Introduction Requests →