UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

65 lines (34 loc) 1.18 kB
--- lang: en title: 'API docs: testlab.createunexpectedhttperrorlogger' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/testlab permalink: /doc/en/lb4/apidocs.testlab.createunexpectedhttperrorlogger.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/testlab](./testlab.md) &gt; [createUnexpectedHttpErrorLogger](./testlab.createunexpectedhttperrorlogger.md) ## createUnexpectedHttpErrorLogger() function Creates a Logger that logs an Error if the HTTP status code is not expected **Signature:** ```typescript export declare function createUnexpectedHttpErrorLogger(expectedStatusCode?: number): LogError; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> expectedStatusCode </td><td markdown="1"> number </td><td markdown="1"> _(Optional)_ HTTP status code that is expected </td></tr> </tbody></table> **Returns:** LogError