Compare commits
2 Commits
0665521a7c
...
42263c2e7b
| Author | SHA1 | Date | |
|---|---|---|---|
| 42263c2e7b | |||
|
|
152235dd14 |
@@ -29,9 +29,16 @@ export const fetchMe = createServerFn()
|
||||
logger.info("FetchMe: Error caught", {
|
||||
message: error?.message,
|
||||
isResponse: error instanceof Response,
|
||||
status: error instanceof Response ? error.status : error?.response?.status
|
||||
status: error instanceof Response ? error.status : error?.response?.status,
|
||||
hasOptions: !!error?.options,
|
||||
redirectTo: error?.options?.to
|
||||
});
|
||||
|
||||
if (error?.options?.to && error?.options?.statusCode) {
|
||||
logger.info("FetchMe: Redirect detected, re-throwing", error.options);
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (error instanceof Response) {
|
||||
const status = error.status;
|
||||
if (status === 440) {
|
||||
|
||||
Reference in New Issue
Block a user