Skip to content

Commit

Permalink
use host unreachable instead of authn. error
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 30, 2024
1 parent 0601baf commit 7088f8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
13 changes: 1 addition & 12 deletions src/Components/CameraFeed/CameraFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function CameraFeed(props: Props) {
.operate({ type: "get_stream_token" })
.then(({ res, data }) => {
if (res?.status != 200) {
setState("authentication_error");
setState("host_unreachable");
return props.onStreamError?.();
}
const result = data?.result as { token: string };
Expand Down Expand Up @@ -221,17 +221,6 @@ export default function CameraFeed(props: Props) {
onResetClick={resetStream}
/>
);
case "authentication_error":
return (
<NoFeedAvailable
message="Authentication Error"
className="text-warning-500"
icon="l-exclamation-triangle"
streamUrl=""
asset={props.asset}
onResetClick={resetStream}
/>
);
case "offline":
return (
<NoFeedAvailable
Expand Down
4 changes: 1 addition & 3 deletions src/Components/CameraFeed/FeedAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export type FeedAlertState =
| "moving"
| "zooming"
| "saving_preset"
| "host_unreachable"
| "authentication_error";
| "host_unreachable";

interface Props {
state?: FeedAlertState;
Expand All @@ -25,7 +24,6 @@ const ALERT_ICON_MAP: Partial<Record<FeedAlertState, IconName>> = {
zooming: "l-search",
saving_preset: "l-save",
host_unreachable: "l-exclamation-triangle",
authentication_error: "l-exclamation-triangle",
};

export default function FeedAlert({ state }: Props) {
Expand Down

0 comments on commit 7088f8d

Please sign in to comment.