Skip to content

Commit

Permalink
Workaround stripe docs change, don't require doc urls
Browse files Browse the repository at this point in the history
  • Loading branch information
mzeitlin11 committed Dec 17, 2023
1 parent b279dcb commit 9930853
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openapi/src/url_finder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use anyhow::{anyhow, Result};
use heck::ToSnakeCase;
use reqwest::blocking::Client;
use tracing::warn;

// we use a common user agent, otherwise stripe rejects the connection
const APP_USER_AGENT: &str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36";
Expand All @@ -27,7 +28,8 @@ impl UrlFinder {
.expect("should be valid json"),
})
} else {
Err(anyhow!("stripe api returned unexpected document"))
warn!("Stripe API returned unexpected document, not collecting doc URL's");
Ok(Self { flattened_api_sections: serde_json::Map::new() })
}
} else {
tracing::error!("{}", resp.text()?);
Expand Down

0 comments on commit 9930853

Please sign in to comment.