Comments (5)
@cver that JSON url isn't publicly accessible, so it actually links to an HTML page with a login panel.
from jsonhero-web.
Still shouldn't crash JSON Hero, so re-opened so we can fix that
from jsonhero-web.
Yep that is true, rewritten the title
from jsonhero-web.
I found that the result after 'useFetcher' in PreviewUri.tsx on the route "/actions/getPreview/${encodedUri}" is not structured as expected. Therefore type-checking for 'string' and injecting the output is a solution, but in my opinion it is a risk. On the other hand locally running it tells me that cloudflare is having some issues regarding some key-value store. But as I had by now not found the time to dive extremly deep into the code I can only start guessing at that point.
return (
<div>
{previewFetcher.type === "done" ? (
<>
{typeof previewFetcher.data == "string" ? (
<PreviewBox>
<Body>
<span
dangerouslySetInnerHTML={{ __html: previewFetcher.data }}
></span>
</Body>
</PreviewBox>
) : "error" in previewFetcher.data ? (
<PreviewBox>
<Body>{previewFetcher.data.error}</Body>
</PreviewBox>
) : (
<PreviewUriElement info={previewFetcher.data} />
)}
</>
) : (
<PreviewBox>
<Body>Loading…</Body>
</PreviewBox>
)}
</div>
);
As a short fix I would preferably just show 'No preview available (Please report at: https://github.com/jsonhero-io/jsonhero-web/issues)' or so as seemingly due to status code 500 it should be fixed server-sided.
from jsonhero-web.
Fixed by @sascha10000 in PR #70
from jsonhero-web.
Related Issues (20)
- Chrome extension can't render json properly HOT 1
- Embeddable version of JSON Hero - needed feature HOT 6
- Precision is lost, and the id is recognized as a date. HOT 1
- npm install error HOT 3
- Error 1102 HOT 1
- Feature request: collapse-all in tree view HOT 12
- "Go" button on homepage should be disabled until input is filled
- "Go" button on homepage should indicate loading state after clicking HOT 2
- Feature request: have multiple json files.
- something was wrong when i want to analysis a JSON HOT 5
- Add a ip-based rate limiter HOT 8
- fix: when in editor view, keyboard shortcut for "select all" (CMD+A) should select all the JSON in the editor HOT 9
- Copy path of a selected node HOT 4
- Feature Request: add notes to objects
- Feature request: integration with faker.js
- Application Error when Loading Multiple JSONs or a list of JSONs in one file
- Receiving 'RangeError: invalid ISO 8601 string' via API for Numbers-only Strings
- Pnet upcoming Event
- array in array considered as an object ? HOT 1
- Where's the data stored? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonhero-web.