Skip to content

Commit 75df607

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Switch bad source map to bad request (#35797)
Will stop it from spamming sentry. It is a bad request in the sense that the client sent up a bad sourcemap. GitOrigin-RevId: 49d34e1d075ad41554c22386255c0496de404160
1 parent a0a1660 commit 75df607

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/isolate/src/helpers.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ impl UdfArgsJson {
207207
pub fn source_map_from_slice(slice: &[u8]) -> Option<sourcemap::SourceMap> {
208208
// If the source map doesn't parse, report the parsing error but don't fail
209209
// the entire request, just treat it like a missing source map.
210-
match sourcemap::SourceMap::from_slice(slice).context("could not parse source map") {
210+
match sourcemap::SourceMap::from_slice(slice).context(ErrorMetadata::bad_request(
211+
"BadSourceMap",
212+
"could not parse source map",
213+
)) {
211214
Ok(source_map) => Some(source_map),
212215
Err(mut e) => {
213216
report_error_sync(&mut e);

0 commit comments

Comments
 (0)