mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-31 15:09:39 +02:00
Fix errors again
This commit is contained in:
parent
f0138fad4f
commit
36d0b83ed3
4 changed files with 22 additions and 7 deletions
|
@ -342,10 +342,13 @@ export async function updateClient(
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (axios.isAxiosError(error)) {
|
if (axios.isAxiosError(error)) {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Error updating destinations (can Pangolin see Gerbil HTTP API?) for exit node at ${destination.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
`Error updating destinations (can Pangolin see Gerbil HTTP API?) for exit node at ${destination.reachableAt} (status: ${error.response?.status}): ${JSON.stringify(error.response?.data, null, 2)}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
logger.error(
|
||||||
|
`Error updating destinations for exit node at ${destination.reachableAt}: ${error}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,11 @@ export async function addPeer(
|
||||||
logger.error(
|
logger.error(
|
||||||
`Error adding peer (can Pangolin see Gerbil HTTP API?) for exit node at ${exitNode.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
`Error adding peer (can Pangolin see Gerbil HTTP API?) for exit node at ${exitNode.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
logger.error(
|
||||||
|
`Error adding peer for exit node at ${exitNode.reachableAt}: ${error}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +78,10 @@ export async function deletePeer(exitNodeId: number, publicKey: string) {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Error deleting peer (can Pangolin see Gerbil HTTP API?) for exit node at ${exitNode.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
`Error deleting peer (can Pangolin see Gerbil HTTP API?) for exit node at ${exitNode.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
logger.error(
|
||||||
|
`Error deleting peer for exit node at ${exitNode.reachableAt}: ${error}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,10 +204,13 @@ export async function updateHolePunch(
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (axios.isAxiosError(error)) {
|
if (axios.isAxiosError(error)) {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Error updating destinations (can Pangolin see Gerbil HTTP API?) for exit node at ${destination.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
`Error updating destinations (can Pangolin see Gerbil HTTP API?) for exit node at ${destination.reachableAt} (status: ${error.response?.status}): ${JSON.stringify(error.response?.data, null, 2)}`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
logger.error(
|
||||||
|
`Error updating destinations for exit node at ${destination.reachableAt}: ${error}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,11 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
|
||||||
logger.error(
|
logger.error(
|
||||||
`Error updating proxy mapping (can Pangolin see Gerbil HTTP API?) for exit node at ${exitNode.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
`Error updating proxy mapping (can Pangolin see Gerbil HTTP API?) for exit node at ${exitNode.reachableAt} (status: ${error.response?.status}): ${error.message}`
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
logger.error(
|
||||||
|
`Error updating proxy mapping for exit node at ${exitNode.reachableAt}: ${error}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue