File tree 5 files changed +12
-7
lines changed
5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
+ ## v0.7.7-alpha
4
+
5
+ - Exported EmptyRelationError
6
+
3
7
## v0.7.6-alpha
4
8
5
9
- Added an error to handle empty relation size of 0 bytes when reading arrow files
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export type { SdkError } from './src/errors';
26
26
export {
27
27
AbortError ,
28
28
ApiError ,
29
+ EmptyRelationError ,
29
30
MaxRelationSizeError ,
30
31
TransactionError ,
31
32
} from './src/errors' ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @relationalai/rai-sdk-javascript" ,
3
3
"description" : " RelationalAI SDK for JavaScript" ,
4
- "version" : " 0.7.6 -alpha" ,
4
+ "version" : " 0.7.7 -alpha" ,
5
5
"author" : {
6
6
"name" : " RelationalAI" ,
7
7
"url" : " https://relational.ai"
Original file line number Diff line number Diff line change 16
16
17
17
import { tableFromIPC } from 'apache-arrow' ;
18
18
19
- import { EmptyRelationSizeError , MaxRelationSizeError } from '../../errors' ;
19
+ import { EmptyRelationError , MaxRelationSizeError } from '../../errors' ;
20
20
import { MetadataInfo } from '../../proto/generated/message' ;
21
21
import { RelationId } from '../../proto/generated/schema' ;
22
22
import {
@@ -96,7 +96,7 @@ export async function readArrowFiles(files: TransactionAsyncFile[]) {
96
96
// all the remaining parts are empty as well in Windows’s Chrome,
97
97
// therefore, throwing the error here to avoid failures downstream
98
98
if ( file . file . size === 0 ) {
99
- throw new EmptyRelationSizeError ( file . name ) ;
99
+ throw new EmptyRelationError ( file . name ) ;
100
100
}
101
101
102
102
const table = await tableFromIPC ( file . file . stream ( ) ) ;
Original file line number Diff line number Diff line change @@ -82,13 +82,13 @@ export class MaxRelationSizeError extends Error {
82
82
}
83
83
}
84
84
85
- export class EmptyRelationSizeError extends Error {
85
+ export class EmptyRelationError extends Error {
86
86
constructor ( public relationId : string ) {
87
- const message = `Empty relation size of 0 bytes. Relation: ${ relationId } ` ;
87
+ const message = `Unexpected 0 bytes relation . Relation: ${ relationId } ` ;
88
88
89
89
super ( message ) ;
90
90
91
- this . name = 'EmptyRelationSizeError ' ;
91
+ this . name = 'EmptyRelationError ' ;
92
92
}
93
93
}
94
94
@@ -109,5 +109,5 @@ export type SdkError =
109
109
| ApiError
110
110
| TransactionError
111
111
| MaxRelationSizeError
112
- | EmptyRelationSizeError
112
+ | EmptyRelationError
113
113
| Error ;
You can’t perform that action at this time.
0 commit comments