Better error messages
This commit is contained in:
parent
fd516eecb3
commit
7a892747d4
|
@ -10,6 +10,6 @@ export class FakeAuth implements Auth {
|
||||||
username: 'test',
|
username: 'test',
|
||||||
domain: 'test_domain'
|
domain: 'test_domain'
|
||||||
}
|
}
|
||||||
throw new Error('Login failed')
|
throw new Error('Fake login failed')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ export class LdapAuth implements Auth {
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log('Error:', error)
|
console.log('Error:', error)
|
||||||
|
|
||||||
throw new Error(`Login failed: ${error.message}`)
|
throw new Error(`Ldap login failed: ${error.message}`)
|
||||||
} finally {
|
} finally {
|
||||||
await this.client.unbind()
|
await this.client.unbind()
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,6 @@ export async function login(username: string, password: string, ip: string) {
|
||||||
return user
|
return user
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log(error.message)
|
console.log(error.message)
|
||||||
throw new Error(`Login failed: ${error.message}`)
|
throw new Error(`Login procedure failed: ${error.message}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user