ember-fastboot / ember-fastboot/ember-cli-fastboot

Add sane error message for unreachable host

Open
#622 6 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
850
Forks
161
Avg merge
17h 45m
Merged PRs (30d)
19

Description

### najax: method jqXHR."getAllResponseHeaders" not implemented

# Update

I'm observing the following error every time my fastboot ember app goes to a route with `this.store.query()`:

```
najax: method jqXHR."getAllResponseHeaders" not implemented
[object Object]
at Object.getAllResponseHeaders (/www/node_modules/najax/lib/najax.js:108:15)
at ajaxResponseData (/www/tmp/broccoli_merge_trees-output_path-xxExqEhS.tmp/assets/addon-tree-output/ember-data/adapters/rest.js:1116:1)
at ajaxErrorHandler (/www/tmp/broccoli_merge_trees-output_path-xxExqEhS.tmp/assets/addon-tree-output/ember-data/adapters/rest.js:1106:1)
at Object.hash.error (/www/tmp/broccoli_merge_trees-output_path-xxExqEhS.tmp/assets/addon-tree-output/ember-data/adapters/rest.js:877:1)
at fire (/www/node_modules/jquery-deferred/lib/jquery-callbacks.js:78:30)
at Object.fireWith (/www/node_modules/jquery-deferred/lib/jquery-callbacks.js:188:7)
at Object.fire [as reject] (/www/node_modules/jquery-deferred/lib/jquery-callbacks.js:195:10)
at ClientRequest.onError (/www/node_modules/najax/lib/najax.js:208:9)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
```

On routes with multiple queries, I'm observing this message many times. It is flooding my logs.

The routes _seem_ to work because Fastboot returns a non-fastboot page, which works.

This happens when the domain _can_ be reached from the client, but _cannot_ be reached from the Fastboot server.

Please add a more sane error message, as this makes it seem like the response is fine but something is wrong with the `najax` library.

----

Looks like this issue:

@kedano [commented on Mar 3, 2016](https://github.com/ember-fastboot/ember-cli-fastboot/issues/101#issuecomment-191688240):

> `ember serve` works just fine on the project and it looks like `ember fastboot` almost works as well except for one issue:
>
> `najax: method jqXHR."getAllResponseHeaders" not implemented`

Except that issue was fixed [~~five hundred~~ two years ago](https://github.com/ember-fastboot/ember-cli-fastboot/issues/101#issuecomment-191765688). The current issue has a different cause.

---

```
$ cat node_modules/ember-cli-fastboot/package.json | grep \"version\":
"version": "1.1.4-beta.1"

$ ./node_modules/.bin/ember version --verbose
ember-cli: 3.3.0
http_parser: 2.8.0
node: 8.12.0
v8: 6.2.414.66
uv: 1.19.2
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2p
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c
os: linux x64
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.