diff --git a/packages/message/src/store/impl.ts b/packages/message/src/store/impl.ts index e7a5e292..494cf141 100644 --- a/packages/message/src/store/impl.ts +++ b/packages/message/src/store/impl.ts @@ -155,8 +155,9 @@ export class StoreMessageClient { const response = await axios.post(`${this.apiServer}/api/v0/storage/add_file`, form, { headers: { Accept: 'application/json', - 'Content-Type': 'multipart/form-data', + // 'Content-Type': 'multipart/form-data', }, + socketPath: getSocketPath(), }) return response.data } catch (error) { diff --git a/packages/message/src/types/errors.ts b/packages/message/src/types/errors.ts index 94ef5c99..9cd5099d 100644 --- a/packages/message/src/types/errors.ts +++ b/packages/message/src/types/errors.ts @@ -20,15 +20,7 @@ export class BroadcastError extends Error { let processedErrors: string[] = [] if (errors instanceof AxiosError) { processedErrors.push(errors.message) - processedErrors.push(errors.cause?.message || '') - if (errors.response?.data) { - if (typeof errors.response.data === 'string') { - processedErrors.push(errors.response.data) - } else - for (const error of errors.response.data as any[]) { - processedErrors.push(JSON.stringify(error)) - } - } + processedErrors.push(JSON.stringify(errors, null, 2)) } else if (errors instanceof Array) { processedErrors = errors } else {