Clarify Tahesab self-signed TLS fix with one-click enable.

Health already failed on certificate; search/import need allowInsecureTls on the connection.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 09:52:27 +03:30
co-authored by Cursor
parent b42d39d756
commit 3277561e55
2 changed files with 82 additions and 7 deletions
@@ -132,9 +132,14 @@ export class TahesabHttpClient {
req.on('error', (err) => {
this.logger.error(`Tahesab call failed: ${path}`, err);
const raw = err.message || String(err);
const tlsHint =
/self-signed|certificate|UNABLE_TO_VERIFY|CERT_/i.test(raw)
? ' — در تنظیمات اتصال، گزینه «پذیرش گواهی SSL خودامضا» را فعال کنید.'
: '';
reject(
new BadGatewayException(
`اتصال به ته‌حساب ناموفق بود: ${err.message}`,
`اتصال به ته‌حساب ناموفق بود: ${raw}${tlsHint}`,
),
);
});