question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API returns truncated inscriptions

See original GitHub issue

E.g

$ curl --compressed -s 'https://openbenches.org/data.json/?bench=8553&format=raw'  | jq .features[].properties.popupContent
"GREATER LIVE HATH<br />\r\nNO MAN OR WOMAN<br />\r\n<br />\r\nTO THE MEMORY OF<br />\r\nCHARLES THOMAS<br />\r\nKENNEDY VC<br />\r\n<br />\r\nHIGHLAND LIGHT INFANTRY<br />\r\nBOER WAR<br />\r\n<br />\r\nBORN …"

compare to what’s shown at https://openbenches.org/bench/8553 Truncation seems to be due to https://github.com/edent/openbenches/blob/baa2fa5dc355b0a65c9739233ddc58b25ddbf919/www/mysql.php#L252 which is used both to get text to display on map, in which context it’s reasonable to truncate, and for API where it doesn’t seem reasonable to truncate.

The API section of the README doesn’t mention that inscription text may be truncated.

The indiscriminate appending of … means inscriptions shown on the map always look like they’ve been truncated regardless of whether they have.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
edentcommented, Oct 14, 2018

I like to keep default behaviour the same wherever possible. That way cached requests don’t break in unexpected ways, and anyone who hasn’t seen the update doesn’t become confused.

0reactions
arizonagroovejetcommented, Oct 14, 2018

Ah, OK. I see the README does say as such. In the PR I submitted not truncating was the default and you didn’t mention intention to change it so I was expecting that behaviour. Out of curiosity, why make people have to explicitly request that inscriptions are complete?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request to API getting truncated - Stack Overflow
I have an Asp.net API application running on Windows data center 2019 and some of the requests for an API get truncated.
Read more >
JSON responses are being truncated #1317 - ktorio/ktor - GitHub
I have two nearly-identical strings (containing valid JSON) and each is used by a MockEngine as GET responses. Calling HttpClient.get<T>(String, ...
Read more >
Rest request body is sometimes truncated - Microsoft Q&A
I have an Asp.net API app where one of the API's requests are randomly missing some of the body's content starting from the...
Read more >
API design - indicate that results were truncated
For reasons, my search endpoint returns a maximum of 50 results. I'm struggling with how best to tell the caller that their results...
Read more >
Epigraphic Database Heidelberg using R
Accessing the EDH database using R · Search parameters for inscriptions and geography · Search parameters for inscriptions · Search parameters for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found