Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

bug: handle bad responses from ADM #57

Merged
merged 4 commits into from
May 6, 2021
Merged

bug: handle bad responses from ADM #57

merged 4 commits into from
May 6, 2021

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented May 3, 2021

Description

ADM can sometimes return invalid content (e.g. a 200 response with no
"tiles".

Report this to sentry, and log, but we return an "empty" value to the
client.

Testing

A bit difficult, since this will query the ADM service directly. It's possible to use an external service which returns an invalid response value (e.g.

echo -e "HTTP/1.1 200\ncontent-length:2\content-type:application/json\n\n{}" | nc -l -p 8080 

and set the CONTILE_ADM_ENDPOINT="http://localhost:8080"
*Note, this is an example only. the response may not be fully valid HTTP

Issue(s)

Closes #55

jrconlin added 2 commits May 3, 2021 11:19
ADM can sometimes return invalid content (e.g. a 200 response with no
"tiles".

Report this to sentry, and log, but we return an "empty" value to the
client.

Closes #54
@jrconlin jrconlin requested a review from a team May 3, 2021 19:55
src/web/handlers.rs Outdated Show resolved Hide resolved
Return a better formatted empty JSON string
@jrconlin jrconlin requested a review from pjenvey May 3, 2021 23:14
pjenvey
pjenvey previously approved these changes May 4, 2021
@jrconlin jrconlin requested a review from pjenvey May 5, 2021 03:00
@jrconlin jrconlin changed the title Bug/54 json bug: handle bad responses from ADM May 5, 2021
@jrconlin jrconlin linked an issue May 5, 2021 that may be closed by this pull request
@pjenvey pjenvey merged commit 352828d into main May 6, 2021
@pjenvey pjenvey deleted the bug/54-json branch May 6, 2021 23:16
Trinaa pushed a commit that referenced this pull request Jun 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing field tiles from adM
2 participants