44 * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
55 */
66
7- export class DataStoreNotFoundError extends Error {
8- constructor ( message : string ) {
9- super ( message ) ;
10- this . name = 'DataStoreNotFoundError' ;
11- Object . setPrototypeOf ( this , DataStoreNotFoundError . prototype ) ;
12- }
13- }
7+ import { DataStoreNotFoundError } from './errors.js' ;
148
15- export class DataStoreServiceError extends Error {
16- constructor ( message : string ) {
17- super ( message ) ;
18- this . name = 'DataStoreServiceError' ;
19- Object . setPrototypeOf ( this , DataStoreServiceError . prototype ) ;
20- }
21- }
22-
23- export class DataStoreUnavailableError extends Error {
24- constructor ( message : string ) {
25- super ( message ) ;
26- this . name = 'DataStoreUnavailableError' ;
27- Object . setPrototypeOf ( this , DataStoreUnavailableError . prototype ) ;
28- }
29- }
9+ export { DataStoreNotFoundError , DataStoreServiceError , DataStoreUnavailableError } from './errors.js' ;
3010
3111/**
3212 * Development-only pseudo data store backed by environment variables.
@@ -87,7 +67,6 @@ export class DataStore {
8767
8868 if ( this . warnOnMissing && ! this . warnedKeys . has ( key ) ) {
8969 this . warnedKeys . add ( key ) ;
90- // eslint-disable-next-line no-console
9170 console . warn ( `Local data-store provider did not find '${ key } '.` ) ;
9271 }
9372
@@ -107,7 +86,6 @@ function readDefaultsFromEnv(): Record<string, Record<string, unknown>> {
10786 return parsed as Record < string , Record < string , unknown > > ;
10887 }
10988 } catch ( error ) {
110- // eslint-disable-next-line no-console
11189 console . warn ( 'Failed to parse SFNEXT_DATA_STORE_DEFAULTS JSON.' , error ) ;
11290 }
11391
0 commit comments