File tree Expand file tree Collapse file tree 5 files changed +12
-7
lines changed
Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## v0.7.7-alpha
4+
5+ - Exported EmptyRelationError
6+
37## v0.7.6-alpha
48
59- 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';
2626export {
2727 AbortError ,
2828 ApiError ,
29+ EmptyRelationError ,
2930 MaxRelationSizeError ,
3031 TransactionError ,
3132} from './src/errors' ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @relationalai/rai-sdk-javascript" ,
33 "description" : " RelationalAI SDK for JavaScript" ,
4- "version" : " 0.7.6 -alpha" ,
4+ "version" : " 0.7.7 -alpha" ,
55 "author" : {
66 "name" : " RelationalAI" ,
77 "url" : " https://relational.ai"
Original file line number Diff line number Diff line change 1616
1717import { tableFromIPC } from 'apache-arrow' ;
1818
19- import { EmptyRelationSizeError , MaxRelationSizeError } from '../../errors' ;
19+ import { EmptyRelationError , MaxRelationSizeError } from '../../errors' ;
2020import { MetadataInfo } from '../../proto/generated/message' ;
2121import { RelationId } from '../../proto/generated/schema' ;
2222import {
@@ -96,7 +96,7 @@ export async function readArrowFiles(files: TransactionAsyncFile[]) {
9696 // all the remaining parts are empty as well in Windows’s Chrome,
9797 // therefore, throwing the error here to avoid failures downstream
9898 if ( file . file . size === 0 ) {
99- throw new EmptyRelationSizeError ( file . name ) ;
99+ throw new EmptyRelationError ( file . name ) ;
100100 }
101101
102102 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 {
8282 }
8383}
8484
85- export class EmptyRelationSizeError extends Error {
85+ export class EmptyRelationError extends Error {
8686 constructor ( public relationId : string ) {
87- const message = `Empty relation size of 0 bytes. Relation: ${ relationId } ` ;
87+ const message = `Unexpected 0 bytes relation . Relation: ${ relationId } ` ;
8888
8989 super ( message ) ;
9090
91- this . name = 'EmptyRelationSizeError ' ;
91+ this . name = 'EmptyRelationError ' ;
9292 }
9393}
9494
@@ -109,5 +109,5 @@ export type SdkError =
109109 | ApiError
110110 | TransactionError
111111 | MaxRelationSizeError
112- | EmptyRelationSizeError
112+ | EmptyRelationError
113113 | Error ;
You can’t perform that action at this time.
0 commit comments