Skip to content

Commit

Permalink
Updating user jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
erdimaden committed May 14, 2024
1 parent e3693c6 commit d6f6b1f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/coinbase/coinbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class Coinbase {
}

/**
* Returns User model for the default user.
* Returns User object for the default user.
* @returns {User} The default user.
* @throws {InternalError} If the request fails.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/coinbase/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
export class InvalidAPIKeyFormat extends Error {
static DEFAULT_MESSAGE = "Invalid API key format";

/**
* Initializes a new InvalidAPIKeyFormat instance.
* @param message - The error message.
*/
constructor(message: string = InvalidAPIKeyFormat.DEFAULT_MESSAGE) {
super(message);
this.name = "InvalidAPIKeyFormat";
Expand All @@ -20,6 +24,10 @@ export class InvalidAPIKeyFormat extends Error {
export class InternalError extends Error {
static DEFAULT_MESSAGE = "Internal Error";

/**
* Initializes a new InternalError instance.
* @param message - The error message.
*/
constructor(message: string = InternalError.DEFAULT_MESSAGE) {
super(message);
this.name = "InternalError";
Expand All @@ -35,6 +43,10 @@ export class InternalError extends Error {
export class InvalidConfiguration extends Error {
static DEFAULT_MESSAGE = "Invalid configuration";

/**
* Initializes a new InvalidConfiguration instance.
* @param message - The error message.
*/
constructor(message: string = InvalidConfiguration.DEFAULT_MESSAGE) {
super(message);
this.name = "InvalidConfiguration";
Expand Down

0 comments on commit d6f6b1f

Please sign in to comment.