image-gen: add a todo about the failing status code

This commit is contained in:
Kasisnu committed 2025-04-04 20:50:53 +05:30
1 parent 8b21489453
commit 23f762da8f
1 file changed
+1
@@ -121,6 +121,7 @@ pub (crate) async fn image_gen_http_request(sora_request: RawSoraImageGenRequest
let response_body = &response.text().await?;
if status != reqwest::StatusCode::OK {
//TODO: Kasisnu: We should parse the error response and return a custom error. status 400 + code "sentinel_block" means we should retry with new sentinel token.
return Err(anyhow::anyhow!("the request failed; status = {:?}, message = {:?}", status, response_body));
}