MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / HandleError

Function HandleError

ui/src/stores/helpers.ts:6–19  ·  view source on GitHub ↗
(e: RpcError)

Source from the content-addressed store, hash-verified

4import history from "../history";
5
6export function HandleError(e: RpcError) {
7 console.log("API error: ", e.toString());
8
9 if (e.code === 16 || e.code === 2) {
10 history.push("/login");
11 return;
12 }
13
14 notification.error({
15 message: "Error",
16 description: e.message,
17 duration: 3,
18 });
19}
20
21export function HandleLoginError(e: RpcError) {
22 console.log("API error: ", e);

Callers 11

SessionStoreClass · 0.90
UserStoreClass · 0.90
ApplicationStoreClass · 0.90
TenantStoreClass · 0.90
DeviceProfileStoreClass · 0.90
GatewayStoreClass · 0.90
DeviceStoreClass · 0.90
FuotaStoreClass · 0.90
MulticastGroupStoreClass · 0.90
RelayStoreClass · 0.90
InternalStoreClass · 0.90

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected