Skip to content

Commit f3402b9

Browse files
committed
Remove FunctionsError interface
1 parent beaa4df commit f3402b9

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

common/api-review/functions.api.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
```ts
66

77
import { FirebaseApp } from '@firebase/app';
8-
import { FirebaseError } from '@firebase/util';
98

109
// @public
1110
export function connectFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;
@@ -17,12 +16,6 @@ export interface Functions {
1716
region: string;
1817
}
1918

20-
// @public
21-
export interface FunctionsError extends FirebaseError {
22-
readonly code: FunctionsErrorCode;
23-
readonly details?: unknown;
24-
}
25-
2619
// @public
2720
export type FunctionsErrorCode = `functions/${FunctionsErrorCodeCore}`;
2821

packages/functions/src/error.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export class FunctionsError extends FirebaseError {
6666
readonly details?: unknown
6767
) {
6868
super(`${FUNCTIONS_TYPE}/${code}`, message || '');
69+
// TODO (dlarocque): Set this to be the root of the stack trace.
6970
}
7071
}
7172

packages/functions/src/public-types.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*/
1717
import { FirebaseApp } from '@firebase/app';
18-
import { FirebaseError } from '@firebase/util';
1918

2019
/**
2120
* An `HttpsCallableResult` wraps a single result from a function call.
@@ -144,23 +143,6 @@ export type FunctionsErrorCodeCore =
144143
*/
145144
export type FunctionsErrorCode = `functions/${FunctionsErrorCodeCore}`;
146145

147-
/**
148-
* An error returned by the Firebase Functions client SDK.
149-
* @public
150-
*/
151-
export interface FunctionsError extends FirebaseError {
152-
/**
153-
* A standard error code that will be returned to the client. This also
154-
* determines the HTTP status code of the response, as defined in code.proto.
155-
*/
156-
readonly code: FunctionsErrorCode;
157-
158-
/**
159-
* Extra data to be converted to JSON and included in the error response.
160-
*/
161-
readonly details?: unknown;
162-
}
163-
164146
declare module '@firebase/component' {
165147
interface NameServiceMapping {
166148
'functions': Functions;

0 commit comments

Comments
 (0)