(request, failAction, err, options)
| 115 | } |
| 116 | |
| 117 | async failAction(request, failAction, err, options) { |
| 118 | |
| 119 | const retain = options.retain ? err : undefined; |
| 120 | if (failAction === 'ignore') { |
| 121 | return retain; |
| 122 | } |
| 123 | |
| 124 | if (failAction === 'log') { |
| 125 | request._log(options.tags, err); |
| 126 | return retain; |
| 127 | } |
| 128 | |
| 129 | if (failAction === 'error') { |
| 130 | throw err; |
| 131 | } |
| 132 | |
| 133 | return await this.execute(failAction, request, { realm: request.route.realm, args: [options.details ?? err] }); |
| 134 | } |
| 135 | }; |
| 136 | |
| 137 |
no test coverage detected