@@ -127,47 +127,34 @@ export class EVaultClient {
127
127
} ) ;
128
128
if ( ! client ) return v4 ( ) ;
129
129
130
- try {
131
- const response = await client . request < StoreMetaEnvelopeResponse > (
132
- STORE_META_ENVELOPE ,
133
- {
134
- input : {
135
- ontology : envelope . schemaId ,
136
- payload : envelope . data ,
137
- acl : [ "*" ] ,
138
- } ,
130
+ const response = await client
131
+ . request < StoreMetaEnvelopeResponse > ( STORE_META_ENVELOPE , {
132
+ input : {
133
+ ontology : envelope . schemaId ,
134
+ payload : envelope . data ,
135
+ acl : [ "*" ] ,
139
136
} ,
140
- ) ;
141
- return response . storeMetaEnvelope . metaEnvelope . id ;
142
- } catch ( error ) {
143
- console . error ( "Error storing meta envelope:" , error ) ;
144
- throw error ;
145
- }
137
+ } )
138
+ . catch ( ( ) => null ) ;
139
+ if ( ! response ) return v4 ( ) ;
140
+ return response . storeMetaEnvelope . metaEnvelope . id ;
146
141
}
147
142
148
143
async storeReference ( referenceId : string , w3id : string ) : Promise < void > {
149
144
const client = await this . ensureClient ( w3id ) ;
150
145
151
- try {
152
- const response = await client . request < StoreMetaEnvelopeResponse > (
153
- STORE_META_ENVELOPE ,
154
- {
155
- input : {
156
- ontology : "reference" ,
157
- payload : {
158
- _by_reference : referenceId ,
159
- } ,
160
- acl : [ "*" ] ,
146
+ const response = await client
147
+ . request < StoreMetaEnvelopeResponse > ( STORE_META_ENVELOPE , {
148
+ input : {
149
+ ontology : "reference" ,
150
+ payload : {
151
+ _by_reference : referenceId ,
161
152
} ,
153
+ acl : [ "*" ] ,
162
154
} ,
163
- ) ;
164
-
165
- response . storeMetaEnvelope . metaEnvelope . id ;
166
- return ;
167
- } catch ( error ) {
168
- console . error ( "Error storing reference:" , error ) ;
169
- throw error ;
170
- }
155
+ } )
156
+ . catch ( ( ) => null ) ;
157
+ if ( ! response ) console . error ( "Failed to update" ) ;
171
158
}
172
159
173
160
async fetchMetaEnvelope ( id : string , w3id : string ) : Promise < MetaEnvelope > {
0 commit comments