Cộng đồng Hỏi & Đáp của Inflearn

[Nhà máy mã] [Trung cấp] Hoạt động rung chuyển! Các kỹ năng cần thiết để trở thành tiền vệ như quản lý trạng thái, quản lý bộ đệm, tạo mã, GoRouter và logic xác thực!
dio요청시 에러 상태코드임에도 onError가 아닌 onReponse에서 응답
Đã giải quyết
Viết
·
241
0
flutter:
[REQ]
[METHOD] GET
[ENDPOINT] http://localhost:8080/api/user/info
flutter:
[RES]
[METHOD] GET
[ENDPOINT] http://localhost:8080/api/user/info
[STATUS CODE] 401현재 제가 진행 중인 프로젝트에서 401 코드임에도 불구하고 onError가 아닌 onReponse로 넘어갑니다.
액세스 토큰 재발급 과정을 onResponse에서 진행해도 되는걸까요?
throw new InvalidVerificationCodeException(ErrorCode.INVALID_CODE);
}백엔드에서 이렇게 에러를 내주는 onResponse로 넘어오네요..
flutter하이브리드-앱
Câu trả lời 2
0
0
jaeyoon1105
Người đặt câu hỏi
아
BaseOptions baseOptions = BaseOptions(
validateStatus: (status) {
return status! >= 200 && status < 500;
},
baseUrl: 'http://${EndPoint.ip}:8080',
);
이 설정 때문에 response로 넘어간거였네요 🙉




