mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 00:54:06 -08:00
17 lines
584 B
TypeScript
17 lines
584 B
TypeScript
import { Service } from 'typedi';
|
|
|
|
import { TaskRunnerDisconnectedError } from './errors/task-runner-disconnected-error';
|
|
import type { DisconnectAnalyzer } from './runner-types';
|
|
import type { TaskRunner } from './task-broker.service';
|
|
|
|
/**
|
|
* Analyzes the disconnect reason of a task runner to provide a more
|
|
* meaningful error message to the user.
|
|
*/
|
|
@Service()
|
|
export class DefaultTaskRunnerDisconnectAnalyzer implements DisconnectAnalyzer {
|
|
async determineDisconnectReason(runnerId: TaskRunner['id']): Promise<Error> {
|
|
return new TaskRunnerDisconnectedError(runnerId);
|
|
}
|
|
}
|