addressing review suggestions
Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
@@ -113,7 +113,7 @@ describe('createRouter', () => {
|
||||
config,
|
||||
logger,
|
||||
discovery,
|
||||
skipBrokenProxies: true,
|
||||
skipInvalidProxies: true,
|
||||
});
|
||||
expect((logger.warn as jest.Mock).mock.calls[0][0]).toEqual(
|
||||
'skipped configuring /test due to Proxy target must be a string',
|
||||
|
||||
@@ -51,7 +51,7 @@ export interface RouterOptions {
|
||||
logger: Logger;
|
||||
config: Config;
|
||||
discovery: PluginEndpointDiscovery;
|
||||
skipBrokenProxies?: boolean;
|
||||
skipInvalidProxies?: boolean;
|
||||
}
|
||||
|
||||
export interface ProxyConfig extends Options {
|
||||
@@ -194,7 +194,7 @@ export async function createRouter(
|
||||
buildMiddleware(pathPrefix, options.logger, route, proxyRouteConfig),
|
||||
);
|
||||
} catch (e) {
|
||||
if (options.skipBrokenProxies) {
|
||||
if (options.skipInvalidProxies) {
|
||||
options.logger.warn(`skipped configuring ${route} due to ${e.message}`);
|
||||
} else {
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user