mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
Merge pull request #191 from protomaps/serverless-ext-mismatch
serverless: improve error message if request doesn't match archive type
This commit is contained in:
@@ -192,7 +192,7 @@ export const handlerRaw = async (
|
|||||||
}
|
}
|
||||||
return apiResp(
|
return apiResp(
|
||||||
400,
|
400,
|
||||||
"Bad request: archive has type ." + pair[1],
|
`Bad request: requested .${ext} but archive has type .${pair[1]}`,
|
||||||
false,
|
false,
|
||||||
headers
|
headers
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export default {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return cacheableResponse(
|
return cacheableResponse(
|
||||||
"Bad request: archive has type ." + pair[1],
|
`Bad request: requested .${ext} but archive has type .${pair[1]}`,
|
||||||
cacheable_headers,
|
cacheable_headers,
|
||||||
400
|
400
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user