@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
24 lines (16 loc) • 1.07 kB
Markdown
---
lang: en
title: 'API docs: authentication.authenticationoptions.failonerror'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/authentication
permalink: /doc/en/lb4/apidocs.authentication.authenticationoptions.failonerror.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/authentication](./authentication.md) > [AuthenticationOptions](./authentication.authenticationoptions.md) > [failOnError](./authentication.authenticationoptions.failonerror.md)
## AuthenticationOptions.failOnError property
This flag allows an authentication strategy to abort the authentication by throwing an error if `failOnError` is set to `true`<!-- -->. By default, the authentication process continues to the next one even when a strategy throws an error. If one of other strategies succeed, the error will be discarded.
<b>Signature:</b>
```typescript
failOnError?: boolean;
```