File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import useSWR from "swr" ;
4
4
5
- import { FetchProfileError } from "../../errors" ;
6
5
import type { User } from "../../types" ;
7
6
8
7
export function useUser ( ) {
@@ -11,7 +10,7 @@ export function useUser() {
11
10
( ...args ) =>
12
11
fetch ( ...args ) . then ( ( res ) => {
13
12
if ( ! res . ok ) {
14
- throw new FetchProfileError ( res . status ) ;
13
+ throw new Error ( "Unauthorized" ) ;
15
14
}
16
15
17
16
if ( res . status === 204 ) {
Original file line number Diff line number Diff line change @@ -144,14 +144,3 @@ export class AccessTokenForConnectionError extends SdkError {
144
144
this . cause = cause ;
145
145
}
146
146
}
147
-
148
- export class FetchProfileError extends SdkError {
149
- public code : string = "fetch_profile_error" ;
150
- public status : number ;
151
-
152
- constructor ( status : number ) {
153
- super ( ) ;
154
- this . name = "FetchProfileError" ;
155
- this . status = status ;
156
- }
157
- }
You can’t perform that action at this time.
0 commit comments