chore:(deps): bump typescript from 4.3.5 to 4.4.2 in /explorer (#19463)
* chore:(deps): bump typescript from 4.3.5 to 4.4.2 in /explorer Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix error type Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Justin Starry <justin@solana.com>
This commit is contained in:
@@ -113,7 +113,7 @@ export function RawInput({
|
||||
setError(undefined);
|
||||
return;
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
if (err instanceof Error) setError(err.message);
|
||||
}
|
||||
} else {
|
||||
setError(undefined);
|
||||
|
@@ -273,7 +273,9 @@ function useSimulator(message: Message) {
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
setLogs(null);
|
||||
setError(err.message);
|
||||
if (err instanceof Error) {
|
||||
setError(err.message);
|
||||
}
|
||||
} finally {
|
||||
setSimulating(false);
|
||||
}
|
||||
|
@@ -126,14 +126,16 @@ export function SolanaClusterStatsProvider({ children }: Props) {
|
||||
if (cluster !== Cluster.Custom) {
|
||||
reportError(error, { url });
|
||||
}
|
||||
dispatchPerformanceInfo({
|
||||
type: PerformanceInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
dispatchDashboardInfo({
|
||||
type: DashboardInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
if (error instanceof Error) {
|
||||
dispatchPerformanceInfo({
|
||||
type: PerformanceInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
dispatchDashboardInfo({
|
||||
type: DashboardInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
}
|
||||
setActive(false);
|
||||
}
|
||||
};
|
||||
@@ -149,10 +151,12 @@ export function SolanaClusterStatsProvider({ children }: Props) {
|
||||
if (cluster !== Cluster.Custom) {
|
||||
reportError(error, { url });
|
||||
}
|
||||
dispatchPerformanceInfo({
|
||||
type: PerformanceInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
if (error instanceof Error) {
|
||||
dispatchPerformanceInfo({
|
||||
type: PerformanceInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
}
|
||||
setActive(false);
|
||||
}
|
||||
};
|
||||
@@ -169,10 +173,12 @@ export function SolanaClusterStatsProvider({ children }: Props) {
|
||||
if (cluster !== Cluster.Custom) {
|
||||
reportError(error, { url });
|
||||
}
|
||||
dispatchDashboardInfo({
|
||||
type: DashboardInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
if (error instanceof Error) {
|
||||
dispatchDashboardInfo({
|
||||
type: DashboardInfoActionType.SetError,
|
||||
data: error.toString(),
|
||||
});
|
||||
}
|
||||
setActive(false);
|
||||
}
|
||||
};
|
||||
|
@@ -6,13 +6,15 @@ type Tags =
|
||||
}
|
||||
| undefined;
|
||||
|
||||
export function reportError(err: Error, tags: Tags) {
|
||||
console.error(err, err.message);
|
||||
try {
|
||||
Sentry.captureException(err, {
|
||||
tags,
|
||||
});
|
||||
} catch (err) {
|
||||
// Sentry can fail if error rate limit is reached
|
||||
export function reportError(err: unknown, tags: Tags) {
|
||||
if (err instanceof Error) {
|
||||
console.error(err, err.message);
|
||||
try {
|
||||
Sentry.captureException(err, {
|
||||
tags,
|
||||
});
|
||||
} catch (err) {
|
||||
// Sentry can fail if error rate limit is reached
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user