qwen_2.5_model / src /common /errors /engine-not-ready.error.ts
Muhammad Noman
Deploy OpenWA to Hugging Face Spaces
46252cd
Raw
History Blame Contribute Delete
791 Bytes
import { ConflictException } from '@nestjs/common';
/**
* Thrown by the engine layer when an operation requires a connected, READY
* WhatsApp client but the session is not in that state — e.g. it was just
* disconnected from the phone, is still initializing, or is reconnecting.
*
* Extends NestJS `ConflictException` so it maps to **HTTP 409** through NestJS's
* built-in exception handler — i.e. it does NOT depend on a custom global filter
* being registered. API callers (and the dashboard) get a clear, retryable
* "session not connected" error instead of a generic 500 Internal Server Error.
*/
export class EngineNotReadyError extends ConflictException {
constructor(message = 'Session is not connected. The WhatsApp client is not ready.') {
super(message);
}
}