File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import { DVCLogger } from '@devcycle/types'
2- // import { UserError } from './utils/userError'
32import { getEnvironmentConfig } from './request'
43import { DevCycleOptions } from '@devcycle/js-cloud-server-sdk'
5- import { ResponseError } from '@devcycle/server-request'
4+ import { ResponseError , UserError } from '@devcycle/server-request'
65
76type ConfigPollingOptions = DevCycleOptions & {
87 cdnURI ?: string
@@ -151,8 +150,7 @@ export class EnvironmentConfigManager {
151150 )
152151 } else if ( responseError ?. status === 403 ) {
153152 this . stopPolling ( )
154- // UserError
155- throw new Error ( `Invalid SDK key provided: ${ this . sdkKey } ` )
153+ throw new UserError ( `Invalid SDK key provided: ${ this . sdkKey } ` )
156154 } else {
157155 throw new Error ( 'Failed to download DevCycle config.' )
158156 }
Original file line number Diff line number Diff line change 11import fetchWithRetry , { RequestInitWithRetry } from 'fetch-retry'
22
3+ export * from './userError'
4+
35export class ResponseError extends Error {
46 constructor ( message : string ) {
57 super ( message )
File renamed without changes.
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import {
1717 VariableTypeAlias ,
1818} from '@devcycle/types'
1919import os from 'os'
20- import { UserError } from './utils/userError'
2120import {
2221 DevCycleUser ,
2322 DVCVariable ,
@@ -31,6 +30,7 @@ import {
3130 DevCycleEvent ,
3231} from '@devcycle/js-cloud-server-sdk'
3332import { DVCPopulatedUserFromDevCycleUser } from './models/populatedUserHelpers'
33+ import { UserError } from '@devcycle/server-request'
3434
3535interface IPlatformData {
3636 platform : string
You can’t perform that action at this time.
0 commit comments