Skip to content

Commit

Permalink
[DOC] Add Reference doc and AdapterError uses
Browse files Browse the repository at this point in the history
  • Loading branch information
spruce committed Nov 3, 2018
1 parent 41bac4e commit a9ad279
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addon/-private/adapters/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ AdapterError.extend = extendFn(AdapterError);
@class InvalidError
@namespace DS
@extends AdapterError
*/
export const InvalidError = extend(
AdapterError,
Expand Down Expand Up @@ -201,6 +202,7 @@ export const InvalidError = extend(
@class TimeoutError
@namespace DS
@extends AdapterError
*/
export const TimeoutError = extend(AdapterError, 'The adapter operation timed out');

Expand All @@ -212,6 +214,7 @@ export const TimeoutError = extend(AdapterError, 'The adapter operation timed ou
@class AbortError
@namespace DS
@extends AdapterError
*/
export const AbortError = extend(AdapterError, 'The adapter operation was aborted');

Expand Down Expand Up @@ -247,6 +250,7 @@ export const AbortError = extend(AdapterError, 'The adapter operation was aborte
@class UnauthorizedError
@namespace DS
@extends AdapterError
*/
export const UnauthorizedError = extend(AdapterError, 'The adapter operation is unauthorized');

Expand All @@ -259,6 +263,7 @@ export const UnauthorizedError = extend(AdapterError, 'The adapter operation is
@class ForbiddenError
@namespace DS
@extends AdapterError
*/
export const ForbiddenError = extend(AdapterError, 'The adapter operation is forbidden');

Expand Down Expand Up @@ -297,6 +302,7 @@ export const ForbiddenError = extend(AdapterError, 'The adapter operation is for
@class NotFoundError
@namespace DS
@extends AdapterError
*/
export const NotFoundError = extend(AdapterError, 'The adapter could not find the resource');

Expand All @@ -309,6 +315,7 @@ export const NotFoundError = extend(AdapterError, 'The adapter could not find th
@class ConflictError
@namespace DS
@extends AdapterError
*/
export const ConflictError = extend(AdapterError, 'The adapter operation failed due to a conflict');

Expand All @@ -319,6 +326,7 @@ export const ConflictError = extend(AdapterError, 'The adapter operation failed
@class ServerError
@namespace DS
@extends AdapterError
*/
export const ServerError = extend(
AdapterError,
Expand Down
7 changes: 7 additions & 0 deletions addon/-private/system/references/reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ function isResourceIdentiferWithRelatedLinks(
return value && value.links && value.links.related;
}

/**
This is the baseClass for the different References
like RecordReference/HasManyReference/BelongsToReference
@class Reference
@namespace DS
*/
export default abstract class Reference {
public recordData: InternalModel['_recordData'];
constructor(
Expand Down

0 comments on commit a9ad279

Please sign in to comment.