Skip to content

Commit d984b3c

Browse files
fix an error for multisig tests
1 parent 505aa17 commit d984b3c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/keri/app/contacting.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ export class Challenges {
192192
said: said,
193193
};
194194
const res = await this.client.fetch(path, method, data);
195-
return await res.json() as Operation<any>;
195+
// Check for empty response
196+
if (res.status === 204 || res.headers.get('content-length') === '0') {
197+
return {} as Operation<any>;
198+
}
199+
const text = await res.text();
200+
if (!text) {
201+
return {} as Operation<any>;
202+
}
203+
return JSON.parse(text) as Operation<any>;
196204
}
197205
}

0 commit comments

Comments
 (0)