Skip to content

Commit

Permalink
Fix last
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Feb 23, 2024
1 parent 178e58a commit 198ccc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 2 additions & 1 deletion packages/message/src/store/impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 1 addition & 9 deletions packages/message/src/types/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 198ccc9

Please sign in to comment.