想定外のエラーの時にエラーメッセージが分かりにくい
Closed this issue · 0 comments
proshunsuke commented
APIのマイナーバージョンが異なっていた際のエラー
[colmsg error]: HTTP status client error (400 Bad Request) for url (https://api.kh.glastonr.net/v2/groups?)
これはこちらの error_for_status
を使っており、エラーになった時にレスポンスをエラーにしてしまうので、reqwestのエラーメッセージがそのまま出ている
https://docs.rs/reqwest/0.8.0/reqwest/struct.Response.html#method.error_for_status
colmsgのコードで言うとこの辺
Line 60 in c64f94f
本当はその後のこの部分でエラーを込めて欲しかったが、現状あまり意味を成していない
Lines 67 to 75 in c64f94f