Add logging and fallback for failing vpnless requests
Summary: If a requests fails due to lack of allow-listing or other incompatibilities, we will now fall back to VPN mode while logging an error that will hopefully end up at the plugin owner. For this, there's a new `vpnMode` option on every request that can also be used to enforce a particular type. There's a lot of verbose logging that's turned off by default but very handy when debugging. Also potentially useful for plugin authors that are looking into request issues. Reviewed By: lblasa Differential Revision: D49023365 fbshipit-source-id: 755393063e379587feda9ae13973877780a1d987
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2ad789d14e
commit
777632b841
@@ -21,6 +21,7 @@ export async function internGraphPOSTAPIRequest(
|
||||
timeout?: number;
|
||||
internGraphUrl?: string;
|
||||
headers?: Record<string, string | number | boolean>;
|
||||
vpnMode?: 'vpn' | 'vpnless';
|
||||
},
|
||||
token: string,
|
||||
): Promise<GraphResponse> {
|
||||
@@ -36,6 +37,7 @@ export async function internGraphGETAPIRequest(
|
||||
timeout?: number;
|
||||
internGraphUrl?: string;
|
||||
headers?: Record<string, string | number | boolean>;
|
||||
vpnMode?: 'vpn' | 'vpnless';
|
||||
},
|
||||
token: string,
|
||||
): Promise<GraphResponse> {
|
||||
|
||||
Reference in New Issue
Block a user