Skip to content

Commit

Permalink
Moved the adapter errors into the public API space. These errors are …
Browse files Browse the repository at this point in the history
…documented as public and required for people implementing a customer adapter.
  • Loading branch information
Wesley Workman committed Mar 28, 2016
1 parent c776275 commit 5074de5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addon/-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import _normalizeLink from "ember-data/-private/system/normalize-link";
import normalizeModelName from "ember-data/-private/system/normalize-model-name";
import {
InvalidError
} from 'ember-data/-private/adapters/errors';
} from 'ember-data/adapters/errors';

import {
promiseArray,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion addon/adapters/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
InvalidError,
TimeoutError,
AbortError
} from 'ember-data/-private/adapters/errors';
} from 'ember-data/adapters/errors';
import BuildURLMixin from "ember-data/-private/adapters/build-url-mixin";
import isEnabled from 'ember-data/-private/features';
import parseResponseHeaders from 'ember-data/-private/utils/parse-response-headers';
Expand Down
2 changes: 1 addition & 1 deletion addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
AbortError,
errorsHashToArray,
errorsArrayToHash
} from "ember-data/-private/adapters/errors";
} from "ember-data/adapters/errors";

import {
RecordArray,
Expand Down
2 changes: 1 addition & 1 deletion addon/serializers/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
getOwner
} from 'ember-data/-private/utils';

import { errorsArrayToHash } from "ember-data/-private/adapters/errors";
import { errorsArrayToHash } from "ember-data/adapters/errors";

import isEnabled from 'ember-data/-private/features';

Expand Down
14 changes: 14 additions & 0 deletions tests/unit/modules-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ import JSONAPISerializer from "ember-data/serializers/json-api";
import RESTSerializer from "ember-data/serializers/rest";
import EmbeddedRecordsMixin from "ember-data/serializers/embedded-records-mixin";

import {
AdapterError,
InvalidError,
TimeoutError,
AbortError
} from "ember-data/adapters/errors";

module("unit/modules - public modules");

test("ember-data/transform", function(assert) {
Expand Down Expand Up @@ -72,3 +79,10 @@ test("ember-data/serializers/json", function(assert) {
test("ember-data/serializers/rest", function(assert) {
assert.ok(RESTSerializer);
});

test("ember-data/adapters/errors", function(assert) {
assert.ok(AdapterError);
assert.ok(InvalidError);
assert.ok(TimeoutError);
assert.ok(AbortError);
});

0 comments on commit 5074de5

Please sign in to comment.