Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Add Reference doc and AdapterError uses #5736

Merged
merged 1 commit into from
Nov 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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