diff --git a/src/bir.ts b/src/bir.ts index 6fdd826..1e6e04b 100644 --- a/src/bir.ts +++ b/src/bir.ts @@ -86,7 +86,7 @@ export default class Bir { const body = template.Zaloguj({ key: this.key }) const response = await this.api({ body }) const sid = unsoap(response) - assert(sid, new BirError('Login failed, no session found in response')) + assert(sid, new BirError('Login failed, no session found')) this.sid = sid } diff --git a/src/extract.ts b/src/extract.ts index d5decce..841f1dc 100644 --- a/src/extract.ts +++ b/src/extract.ts @@ -5,7 +5,7 @@ import { BirError } from './error.js' export function unsoap(string: string) { const match = /<\S+Result>(.+)<\/\S+Result>/s.exec(string) - assert(match?.[1], new BirError('SOAP Result empty or not found in response')) + assert(match?.[1], new BirError('Empty response')) return match[1] }