Skip to content

Documentation / @gebeta/api

@gebeta/api

Enumerations

ErrorCode

Error codes for consistent error identification across all SDKs. Organized by category with numeric suffixes for easy filtering.

Enumeration Members

Enumeration MemberValueDefined in
API_BAD_REQUEST"API_3001"packages/api/src/errors/codes.ts:33
API_FORBIDDEN"API_3003"packages/api/src/errors/codes.ts:35
API_NOT_FOUND"API_3004"packages/api/src/errors/codes.ts:36
API_RATE_LIMIT"API_3005"packages/api/src/errors/codes.ts:37
API_SERVER_ERROR"API_3006"packages/api/src/errors/codes.ts:38
API_UNAUTHORIZED"API_3002"packages/api/src/errors/codes.ts:34
API_UNKNOWN_ERROR"API_3007"packages/api/src/errors/codes.ts:39
GEOCODING_INVALID_COORDINATES"GEOCODING_4002"packages/api/src/errors/codes.ts:43
GEOCODING_NOT_FOUND"GEOCODING_4001"packages/api/src/errors/codes.ts:42
GEOCODING_REQUEST_FAILED"GEOCODING_4003"packages/api/src/errors/codes.ts:44
NAVIGATION_NOT_STARTED"NAVIGATION_6001"packages/api/src/errors/codes.ts:53
NAVIGATION_OFF_ROUTE"NAVIGATION_6002"packages/api/src/errors/codes.ts:54
NAVIGATION_REQUEST_FAILED"NAVIGATION_6003"packages/api/src/errors/codes.ts:55
NETWORK_FAILED"NETWORK_2001"packages/api/src/errors/codes.ts:27
NETWORK_OFFLINE"NETWORK_2003"packages/api/src/errors/codes.ts:29
NETWORK_REQUEST_FAILED"NETWORK_2004"packages/api/src/errors/codes.ts:30
NETWORK_TIMEOUT"NETWORK_2002"packages/api/src/errors/codes.ts:28
PLATFORM_GEOLOCATION_DENIED"PLATFORM_7001"packages/api/src/errors/codes.ts:58
PLATFORM_GEOLOCATION_TIMEOUT"PLATFORM_7003"packages/api/src/errors/codes.ts:60
PLATFORM_GEOLOCATION_UNAVAILABLE"PLATFORM_7002"packages/api/src/errors/codes.ts:59
PLATFORM_NOT_INITIALIZED"PLATFORM_7004"packages/api/src/errors/codes.ts:61
ROUTING_INVALID_POLYLINE"ROUTING_5004"packages/api/src/errors/codes.ts:50
ROUTING_INVALID_WAYPOINTS"ROUTING_5002"packages/api/src/errors/codes.ts:48
ROUTING_NO_ROUTE"ROUTING_5001"packages/api/src/errors/codes.ts:47
ROUTING_REQUEST_FAILED"ROUTING_5003"packages/api/src/errors/codes.ts:49
VALIDATION_INVALID_FORMAT"VALIDATION_1002"packages/api/src/errors/codes.ts:22
VALIDATION_INVALID_TYPE"VALIDATION_1004"packages/api/src/errors/codes.ts:24
VALIDATION_OUT_OF_RANGE"VALIDATION_1003"packages/api/src/errors/codes.ts:23
VALIDATION_REQUIRED_FIELD"VALIDATION_1001"packages/api/src/errors/codes.ts:21

ErrorDomain

Error domain/feature area where an error occurred.

Enumeration Members

Enumeration MemberValueDefined in
API"api"packages/api/src/errors/codes.ts:7
GEOCODING"geocoding"packages/api/src/errors/codes.ts:8
NAVIGATION"navigation"packages/api/src/errors/codes.ts:10
NETWORK"network"packages/api/src/errors/codes.ts:6
PLATFORM"platform"packages/api/src/errors/codes.ts:12
ROUTING"routing"packages/api/src/errors/codes.ts:9
TRACKING"tracking"packages/api/src/errors/codes.ts:11
VALIDATION"validation"packages/api/src/errors/codes.ts:5

Classes

ApiError

Base error class for API-related errors.

Extends

Extended by

Constructors

new ApiError()
ts
new ApiError(
   message, 
   statusCode, 
   code, 
   requestId?, 
   context?): ApiError
Parameters
ParameterType
messagestring
statusCodenumber
codeErrorCode
requestId?string
context?Record<string, unknown>
Returns

ApiError

Overrides

GebetaError.constructor

Defined in

packages/api/src/errors/api.ts:11

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-GebetaError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-GebetaError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-GebetaError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-GebetaError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-GebetaError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-GebetaError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-GebetaError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-GebetaError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber--packages/api/src/errors/api.ts:9
timestampreadonlynumber-GebetaError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.GebetaError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

GebetaError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

GebetaError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GebetaError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


BadRequestError

Error thrown for 400 Bad Request responses.

Extends

Constructors

new BadRequestError()
ts
new BadRequestError(
   message, 
   requestId?, 
   context?): BadRequestError
Parameters
ParameterType
messagestring
requestId?string
context?Record<string, unknown>
Returns

BadRequestError

Overrides

ApiError.constructor

Defined in

packages/api/src/errors/api.ts:45

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-ApiError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-ApiError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-ApiError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-ApiError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-ApiError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-ApiError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-ApiError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-ApiError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber-ApiError.statusCodepackages/api/src/errors/api.ts:9
timestampreadonlynumber-ApiError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.ApiError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

ApiError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

ApiError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Inherited from

ApiError.fromResponse

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

ApiError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


BusinessLogicError

Base error class for business logic errors.

Extends

Extended by

Constructors

new BusinessLogicError()
ts
new BusinessLogicError(
   code, 
   message, 
   domain, 
   context?): BusinessLogicError
Parameters
ParameterType
codeErrorCode
messagestring
domainErrorDomain
context?Record<string, unknown>
Returns

BusinessLogicError

Overrides

GebetaError.constructor

Defined in

packages/api/src/errors/business.ts:8

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-GebetaError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-GebetaError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-GebetaError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-GebetaError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-GebetaError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-GebetaError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-GebetaError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-GebetaError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-GebetaError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.GebetaError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

GebetaError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

GebetaError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GebetaError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


ForbiddenError

Error thrown for 403 Forbidden responses.

Extends

Constructors

new ForbiddenError()
ts
new ForbiddenError(message, requestId?): ForbiddenError
Parameters
ParameterType
messagestring
requestId?string
Returns

ForbiddenError

Overrides

ApiError.constructor

Defined in

packages/api/src/errors/api.ts:65

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-ApiError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-ApiError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-ApiError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-ApiError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-ApiError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-ApiError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-ApiError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-ApiError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber-ApiError.statusCodepackages/api/src/errors/api.ts:9
timestampreadonlynumber-ApiError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.ApiError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

ApiError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

ApiError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Inherited from

ApiError.fromResponse

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

ApiError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


GebetaError

Base error class for all Gebeta SDK errors. Provides consistent error structure across all SDKs.

Extends

  • Error

Extended by

Constructors

new GebetaError()
ts
new GebetaError(details): GebetaError
Parameters
ParameterType
detailsGebetaErrorDetails
Returns

GebetaError

Overrides

Error.constructor

Defined in

packages/api/src/errors/base.ts:16

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode--packages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>--packages/api/src/errors/base.ts:11
domain?readonlyErrorDomain--packages/api/src/errors/base.ts:10
messagepublicstring-Error.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-Error.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError--packages/api/src/errors/base.ts:12
requestId?readonlystring--packages/api/src/errors/base.ts:14
stack?publicstring-Error.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber--packages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.Error.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


GeocodingError

Error thrown for geocoding-related failures.

Extends

Constructors

new GeocodingError()
ts
new GeocodingError(
   code, 
   message, 
   context?): GeocodingError
Parameters
ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>
Returns

GeocodingError

Overrides

BusinessLogicError.constructor

Defined in

packages/api/src/errors/business.ts:29

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-BusinessLogicError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-BusinessLogicError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-BusinessLogicError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-BusinessLogicError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-BusinessLogicError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-BusinessLogicError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-BusinessLogicError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-BusinessLogicError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-BusinessLogicError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.BusinessLogicError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

BusinessLogicError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

BusinessLogicError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

BusinessLogicError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


GeolocationDeniedError

Error thrown when geolocation access is denied.

Extends

Constructors

new GeolocationDeniedError()
ts
new GeolocationDeniedError(originalError?): GeolocationDeniedError
Parameters
ParameterType
originalError?Error
Returns

GeolocationDeniedError

Overrides

PlatformError.constructor

Defined in

packages/api/src/errors/platform.ts:30

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-PlatformError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-PlatformError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-PlatformError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-PlatformError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-PlatformError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-PlatformError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-PlatformError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-PlatformError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-PlatformError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.PlatformError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

PlatformError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

PlatformError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

PlatformError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


GeolocationTimeoutError

Error thrown when geolocation request times out.

Extends

Constructors

new GeolocationTimeoutError()
ts
new GeolocationTimeoutError(timeoutMs?, originalError?): GeolocationTimeoutError
Parameters
ParameterType
timeoutMs?number
originalError?Error
Returns

GeolocationTimeoutError

Overrides

PlatformError.constructor

Defined in

packages/api/src/errors/platform.ts:60

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-PlatformError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-PlatformError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-PlatformError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-PlatformError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-PlatformError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-PlatformError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-PlatformError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-PlatformError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-PlatformError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.PlatformError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

PlatformError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

PlatformError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

PlatformError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


GeolocationUnavailableError

Error thrown when geolocation is unavailable.

Extends

Constructors

new GeolocationUnavailableError()
ts
new GeolocationUnavailableError(originalError?): GeolocationUnavailableError
Parameters
ParameterType
originalError?Error
Returns

GeolocationUnavailableError

Overrides

PlatformError.constructor

Defined in

packages/api/src/errors/platform.ts:45

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-PlatformError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-PlatformError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-PlatformError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-PlatformError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-PlatformError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-PlatformError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-PlatformError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-PlatformError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-PlatformError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.PlatformError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

PlatformError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

PlatformError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

PlatformError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


Error thrown for navigation-related failures.

Extends

Constructors

new NavigationError()
ts
new NavigationError(
   code, 
   message, 
   context?): NavigationError
Parameters
ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>
Returns

NavigationError

Overrides

BusinessLogicError.constructor

Defined in

packages/api/src/errors/business.ts:49

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-BusinessLogicError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-BusinessLogicError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-BusinessLogicError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-BusinessLogicError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-BusinessLogicError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-BusinessLogicError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-BusinessLogicError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-BusinessLogicError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-BusinessLogicError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.BusinessLogicError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

BusinessLogicError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

BusinessLogicError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

BusinessLogicError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


NetworkError

Error thrown when network operations fail.

Extends

Extended by

Constructors

new NetworkError()
ts
new NetworkError(
   message, 
   code, 
   originalError?, 
   context?): NetworkError
Parameters
ParameterType
messagestring
codeErrorCode
originalError?Error
context?Record<string, unknown>
Returns

NetworkError

Overrides

GebetaError.constructor

Defined in

packages/api/src/errors/network.ts:8

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-GebetaError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-GebetaError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-GebetaError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-GebetaError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-GebetaError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-GebetaError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-GebetaError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-GebetaError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-GebetaError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.GebetaError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

GebetaError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

GebetaError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GebetaError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


NetworkOfflineError

Error thrown when the device is offline.

Extends

Constructors

new NetworkOfflineError()
ts
new NetworkOfflineError(originalError?): NetworkOfflineError
Parameters
ParameterType
originalError?Error
Returns

NetworkOfflineError

Overrides

NetworkError.constructor

Defined in

packages/api/src/errors/network.ts:45

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-NetworkError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-NetworkError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-NetworkError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-NetworkError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-NetworkError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-NetworkError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-NetworkError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-NetworkError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-NetworkError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.NetworkError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

NetworkError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

NetworkError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

NetworkError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


NetworkTimeoutError

Error thrown when a network request times out.

Extends

Constructors

new NetworkTimeoutError()
ts
new NetworkTimeoutError(timeoutMs?, originalError?): NetworkTimeoutError
Parameters
ParameterType
timeoutMs?number
originalError?Error
Returns

NetworkTimeoutError

Overrides

NetworkError.constructor

Defined in

packages/api/src/errors/network.ts:30

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-NetworkError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-NetworkError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-NetworkError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-NetworkError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-NetworkError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-NetworkError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-NetworkError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-NetworkError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-NetworkError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.NetworkError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

NetworkError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

NetworkError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

NetworkError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


NotFoundError

Error thrown for 404 Not Found responses.

Extends

Constructors

new NotFoundError()
ts
new NotFoundError(message, requestId?): NotFoundError
Parameters
ParameterType
messagestring
requestId?string
Returns

NotFoundError

Overrides

ApiError.constructor

Defined in

packages/api/src/errors/api.ts:75

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-ApiError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-ApiError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-ApiError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-ApiError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-ApiError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-ApiError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-ApiError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-ApiError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber-ApiError.statusCodepackages/api/src/errors/api.ts:9
timestampreadonlynumber-ApiError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.ApiError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

ApiError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

ApiError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Inherited from

ApiError.fromResponse

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

ApiError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


PlatformError

Error thrown for platform-specific failures (e.g., geolocation API).

Extends

Extended by

Constructors

new PlatformError()
ts
new PlatformError(
   code, 
   message, 
   context?, 
   originalError?): PlatformError
Parameters
ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>
originalError?Error
Returns

PlatformError

Overrides

GebetaError.constructor

Defined in

packages/api/src/errors/platform.ts:8

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-GebetaError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-GebetaError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-GebetaError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-GebetaError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-GebetaError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-GebetaError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-GebetaError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-GebetaError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-GebetaError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.GebetaError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

GebetaError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

GebetaError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GebetaError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


RateLimitError

Error thrown for 429 Rate Limit responses.

Extends

Constructors

new RateLimitError()
ts
new RateLimitError(
   message, 
   requestId?, 
   retryAfter?): RateLimitError
Parameters
ParameterType
messagestring
requestId?string
retryAfter?number
Returns

RateLimitError

Overrides

ApiError.constructor

Defined in

packages/api/src/errors/api.ts:85

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-ApiError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-ApiError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-ApiError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-ApiError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-ApiError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-ApiError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-ApiError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-ApiError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber-ApiError.statusCodepackages/api/src/errors/api.ts:9
timestampreadonlynumber-ApiError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.ApiError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

ApiError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

ApiError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Inherited from

ApiError.fromResponse

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

ApiError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


RoutingError

Error thrown for routing-related failures.

Extends

Constructors

new RoutingError()
ts
new RoutingError(
   code, 
   message, 
   context?): RoutingError
Parameters
ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>
Returns

RoutingError

Overrides

BusinessLogicError.constructor

Defined in

packages/api/src/errors/business.ts:39

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-BusinessLogicError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-BusinessLogicError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-BusinessLogicError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-BusinessLogicError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-BusinessLogicError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-BusinessLogicError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-BusinessLogicError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-BusinessLogicError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-BusinessLogicError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.BusinessLogicError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

BusinessLogicError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

BusinessLogicError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

BusinessLogicError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


ServerError

Error thrown for 5xx Server Error responses.

Extends

Constructors

new ServerError()
ts
new ServerError(
   message, 
   statusCode, 
   requestId?): ServerError
Parameters
ParameterType
messagestring
statusCodenumber
requestId?string
Returns

ServerError

Overrides

ApiError.constructor

Defined in

packages/api/src/errors/api.ts:101

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-ApiError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-ApiError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-ApiError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-ApiError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-ApiError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-ApiError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-ApiError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-ApiError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber-ApiError.statusCodepackages/api/src/errors/api.ts:9
timestampreadonlynumber-ApiError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.ApiError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

ApiError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

ApiError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Inherited from

ApiError.fromResponse

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

ApiError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


TrackingError

Error thrown for tracking-related failures.

Extends

Constructors

new TrackingError()
ts
new TrackingError(
   code, 
   message, 
   context?): TrackingError
Parameters
ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>
Returns

TrackingError

Overrides

BusinessLogicError.constructor

Defined in

packages/api/src/errors/business.ts:59

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-BusinessLogicError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-BusinessLogicError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-BusinessLogicError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-BusinessLogicError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-BusinessLogicError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-BusinessLogicError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-BusinessLogicError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-BusinessLogicError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-BusinessLogicError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.BusinessLogicError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

BusinessLogicError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

BusinessLogicError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

BusinessLogicError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


UnauthorizedError

Error thrown for 401 Unauthorized responses.

Extends

Constructors

new UnauthorizedError()
ts
new UnauthorizedError(message, requestId?): UnauthorizedError
Parameters
ParameterType
messagestring
requestId?string
Returns

UnauthorizedError

Overrides

ApiError.constructor

Defined in

packages/api/src/errors/api.ts:55

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-ApiError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-ApiError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-ApiError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-ApiError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-ApiError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-ApiError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-ApiError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-ApiError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
statusCodereadonlynumber-ApiError.statusCodepackages/api/src/errors/api.ts:9
timestampreadonlynumber-ApiError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.ApiError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

ApiError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

ApiError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

fromResponse()
ts
static fromResponse(response, statusCode): ApiError
Parameters
ParameterType
responseApiErrorResponse
statusCodenumber
Returns

ApiError

Inherited from

ApiError.fromResponse

Defined in

packages/api/src/errors/api.ts:30

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

ApiError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56


ValidationError

Error thrown when input validation fails.

Extends

Constructors

new ValidationError()
ts
new ValidationError(
   message, 
   field?, 
   context?): ValidationError
Parameters
ParameterType
messagestring
field?string
context?Record<string, unknown>
Returns

ValidationError

Overrides

GebetaError.constructor

Defined in

packages/api/src/errors/validation.ts:8

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
codereadonlyErrorCode-GebetaError.codepackages/api/src/errors/base.ts:9
context?readonlyRecord<string, unknown>-GebetaError.contextpackages/api/src/errors/base.ts:11
domain?readonlyErrorDomain-GebetaError.domainpackages/api/src/errors/base.ts:10
messagepublicstring-GebetaError.messagenode_modules/typescript/lib/lib.es5.d.ts:1077
namepublicstring-GebetaError.namenode_modules/typescript/lib/lib.es5.d.ts:1076
originalError?readonlyError-GebetaError.originalErrorpackages/api/src/errors/base.ts:12
requestId?readonlystring-GebetaError.requestIdpackages/api/src/errors/base.ts:14
stack?publicstring-GebetaError.stacknode_modules/typescript/lib/lib.es5.d.ts:1078
timestampreadonlynumber-GebetaError.timestamppackages/api/src/errors/base.ts:13
stackTraceLimitstaticnumberThe Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames.GebetaError.stackTraceLimitnode_modules/@types/node/globals.d.ts:68

Methods

toJSON()
ts
toJSON(): GebetaErrorDetails

Get error details as a plain object.

Returns

GebetaErrorDetails

Inherited from

GebetaError.toJSON

Defined in

packages/api/src/errors/base.ts:36

captureStackTrace()
ts
static captureStackTrace(targetObject, constructorOpt?): void

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
Parameters
ParameterType
targetObjectobject
constructorOpt?Function
Returns

void

Inherited from

GebetaError.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:52

prepareStackTrace()
ts
static prepareStackTrace(err, stackTraces): any
Parameters
ParameterType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

GebetaError.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:56

Interfaces

ApiErrorResponse

API error response structure from backend.

Properties

PropertyTypeDefined in
errorobjectpackages/api/src/errors/types.ts:38
error.code?stringpackages/api/src/errors/types.ts:39
error.details?Record<string, unknown>packages/api/src/errors/types.ts:41
error.messagestringpackages/api/src/errors/types.ts:40
error.requestId?stringpackages/api/src/errors/types.ts:42

GebetaErrorDetails

Base error details structure for all Gebeta errors.

Properties

PropertyTypeDescriptionDefined in
codeErrorCodeError code for programmatic error handlingpackages/api/src/errors/types.ts:8
context?Record<string, unknown>Additional context data for debugging and error handling. Examples: - Field names that failed validation - Retry information (e.g., { retryAfter: 60 }) - Request parameters that caused the error - Any other relevant debugging informationpackages/api/src/errors/types.ts:21
domain?ErrorDomainDomain/feature area where the error occurredpackages/api/src/errors/types.ts:12
messagestringHuman-readable error messagepackages/api/src/errors/types.ts:10
originalError?ErrorOriginal error that was wrapped (if applicable)packages/api/src/errors/types.ts:23
requestId?stringRequest ID from the API response (for API errors). Used to correlate errors with server-side logs for debugging. Typically returned in response headers (x-request-id) or error response body.packages/api/src/errors/types.ts:31
timestampnumberTimestamp when the error occurredpackages/api/src/errors/types.ts:25

Functions

createApiError()

ts
function createApiError(
   statusCode, 
   response, 
   requestId?): ApiError

Creates an API error from an HTTP response. Uses getErrorCodeForStatusCode (from api.ts) as the single source of truth for status code → error code mapping, then instantiates the appropriate error class.

Parameters

ParameterType
statusCodenumber
responsestring | ApiErrorResponse
requestId?string

Returns

ApiError

Defined in

packages/api/src/errors/factories.ts:64


createGeocodingError()

ts
function createGeocodingError(
   code, 
   message, 
   context?): GeocodingError

Creates a geocoding error given a code, message and a context.

Parameters

ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>

Returns

GeocodingError

Defined in

packages/api/src/errors/factories.ts:116


createNavigationError()

ts
function createNavigationError(
   code, 
   message, 
   context?): NavigationError

Creates a navigation error given a code, message and a context.

Parameters

ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>

Returns

NavigationError

Defined in

packages/api/src/errors/factories.ts:138


createNetworkError()

ts
function createNetworkError(originalError, context?): NetworkError

Creates a network error from a fetch failure given an original error and a context.

Parameters

ParameterType
originalErrorError
context?Record<string, unknown>

Returns

NetworkError

Defined in

packages/api/src/errors/factories.ts:30


createNetworkOfflineError()

ts
function createNetworkOfflineError(originalError?): NetworkOfflineError

Creates a network offline error.

Parameters

ParameterType
originalError?Error

Returns

NetworkOfflineError

Defined in

packages/api/src/errors/factories.ts:55


createNetworkTimeoutError()

ts
function createNetworkTimeoutError(originalError?, timeoutMs?): NetworkTimeoutError

Creates a network timeout error given a timeout in milliseconds and an original error.

Parameters

ParameterType
originalError?Error
timeoutMs?number

Returns

NetworkTimeoutError

Defined in

packages/api/src/errors/factories.ts:45


createRoutingError()

ts
function createRoutingError(
   code, 
   message, 
   context?): RoutingError

Creates a routing error given a code, message and a context.

Parameters

ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>

Returns

RoutingError

Defined in

packages/api/src/errors/factories.ts:127


createTrackingError()

ts
function createTrackingError(
   code, 
   message, 
   context?): TrackingError

Creates a tracking error given a code, message and a context.

Parameters

ParameterType
codeErrorCode
messagestring
context?Record<string, unknown>

Returns

TrackingError

Defined in

packages/api/src/errors/factories.ts:149


createValidationError()

ts
function createValidationError(field, reason?): ValidationError

Creates a validation error for a required field given a field name and a reason.

Parameters

ParameterType
fieldstring
reason?string

Returns

ValidationError

Defined in

packages/api/src/errors/factories.ts:20


extractRequestId()

ts
function extractRequestId(response): Promise<string | undefined>

Extracts request ID from a Response object (from headers or body).

Parameters

ParameterType
responseResponse

Returns

Promise<string | undefined>

Defined in

packages/api/src/errors/utils.ts:79


formatErrorForLogging()

ts
function formatErrorForLogging(error): string

Formats an error for logging purposes.

Parameters

ParameterType
errorGebetaError

Returns

string

Defined in

packages/api/src/errors/utils.ts:35


getErrorCode()

ts
function getErrorCode(error): ErrorCode | null

Gets the error code from an error, or null if not a GebetaError.

Parameters

ParameterType
errorunknown

Returns

ErrorCode | null

Defined in

packages/api/src/errors/utils.ts:15


getErrorDomain()

ts
function getErrorDomain(error): ErrorDomain | null

Gets the error domain from an error, or null if not a GebetaError.

Parameters

ParameterType
errorunknown

Returns

ErrorDomain | null

Defined in

packages/api/src/errors/utils.ts:25


isGebetaError()

ts
function isGebetaError(error): error is GebetaError

Type guard to check if an error is a GebetaError.

Parameters

ParameterType
errorunknown

Returns

error is GebetaError

Defined in

packages/api/src/errors/utils.ts:8


parseApiErrorResponse()

ts
function parseApiErrorResponse(response): Promise<ApiErrorResponse>

Parses an API error response from a Response object.

Parameters

ParameterType
responseResponse

Returns

Promise<ApiErrorResponse>

Defined in

packages/api/src/errors/utils.ts:56

Namespaces

NamespaceDescription
API-
Clustering-
Common-
Components-
Events-
Fencing-
Geocoding-
Map-
Navigation-
Overlay-
Platform-
Routing-
Tracking-