export function getStreamErrorMessage(event) {
    var _a, _b;
    if (typeof event.error === 'string')
        return event.error;
    const dataError = (_a = event.data) === null || _a === void 0 ? void 0 : _a.error;
    if (dataError)
        return dataError;
    const message = (_b = event.error) === null || _b === void 0 ? void 0 : _b.message;
    if (message)
        return message;
    return 'Stream error';
}
//# sourceMappingURL=getStreamErrorMessage.js.map
