Comments (1)
This is because the restify JsonClient
isn't very practical when the endpoint happens to not return JSON. I've a better (at least for this) JSON client borrowed heavily from https://github.com/joyent/node-docker-registry-client/blob/v2/lib/docker-json-client.js that should help here.
After:
...
[2015-09-23T19:16:19.485Z] TRACE: triton/39188 on danger0.local (/Users/trentm/joy/node-triton/lib/xxx-json-client.js:130 in finish): Invalid JSON in response
SyntaxError: Unexpected token <
at Object.parse (native)
at IncomingMessage.finish (/Users/trentm/joy/node-triton/lib/xxx-json-client.js:128:32)
at IncomingMessage.g (events.js:180:16)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:448:13)
triton imgs: error: InvalidContentError: <!DOCTYPE html>
...(all the HTML content elided)...
</body>
</html>
at IncomingMessage.finish (/Users/trentm/joy/node-triton/lib/xxx-json-client.js:133:34)
at IncomingMessage.g (events.js:180:16)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:448:13)
At least this more clearly shows that it got a non-JSON response. I hope this doesn't cause other issues, given that I'm fully replacing the restify JSON client.
from node-triton.
Related Issues (20)
- v7.5.0 HOT 1
- triton inst migration finalize: error: not a valid migration action HOT 2
- Want Triton image update / tag HOT 1
- fs.unlink() requires a callback HOT 9
- node-triton fails to resolve host when a CNAME HOT 1
- triton volume list and triton volume sizes should agree on a unit HOT 1
- Honor the XDG directory conventions HOT 1
- `triton profile` should generate certs for cmon
- triton rbac commands generate os.tmpDir deprecation warning HOT 1
- Unhide volumes HOT 1
- Wrong CLI_CONFIG_DIR when XDG_CONFIG_HOME is set HOT 1
- want act-as support for "triton profile docker-setup" and "triton profile cmon-certgen" HOT 1
- cmon-certgen should generate an example prometheus.yml HOT 1
- want --primary argument to "triton inst nic create" HOT 1
- AssertionError in keyring.js caused by OpenSSL 3 HOT 4
- BadDigestError: Content-MD5 when body has non-ascii characters HOT 4
- want cloud-config syntactic sugar
- Want npm lockfile HOT 2
- `instance ssh --help` is missing docs about tag `tritoncli.ssh.port`
- make cutarelease broke
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 node-triton.