mirror of
https://github.com/Lissy93/web-check.git
synced 2024-11-25 01:33:20 +01:00
feat: improved err messaging for netlify
This commit is contained in:
parent
316e0d97fd
commit
7d4eab28b4
@ -22,7 +22,7 @@ const Nav = (props: { children?: ReactNode}) => {
|
||||
<Header as="header">
|
||||
<Heading color={colors.primary} size="large">
|
||||
<img width="64" src="/web-check.png" alt="Web Check Icon" />
|
||||
<Link to="/check">Web Check</Link>
|
||||
<Link to="/">Web Check</Link>
|
||||
</Heading>
|
||||
{props.children && props.children}
|
||||
</Header>
|
||||
|
@ -47,6 +47,10 @@ const useMotherOfAllHooks = <ResultType = any>(params: UseIpAddressProps<ResultT
|
||||
} else {
|
||||
updateLoadingJobs(jobId, 'error', res.error, reset);
|
||||
}
|
||||
} else if (res.errorType && res.errorMessage) {
|
||||
const errorMessage = `${res.errorType}\n${res.errorMessage}\n\n`
|
||||
+ `This sometimes occurs on Netlify if using the free plan. You may need to upgrade to use lambda functions`;
|
||||
updateLoadingJobs(jobId, 'error', errorMessage, reset);
|
||||
} else if (res.skipped) { // Response returned a skipped message
|
||||
updateLoadingJobs(jobId, 'skipped', res.skipped, reset);
|
||||
} else { // Yay, everything went to plan :)
|
||||
|
Loading…
Reference in New Issue
Block a user