Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

**Fix**: unify error format #135

Merged
merged 1 commit into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Mutate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class ContextlessMutate<TData, TError, TQueryParams, TRequestBody> extends React
response = await fetch(request, { signal: this.signal });
} catch (e) {
const error = {
message: "Failed to fetch" + e.message ? `: ${e.message}` : "",
message: `Failed to fetch: ${e.message}`,
data: "",
};

Expand Down
2 changes: 1 addition & 1 deletion src/useMutate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function useMutate<
response = await fetch(request);
} catch (e) {
const error = {
message: "Failed to fetch" + e.message ? `: ${e.message}` : "",
message: `Failed to fetch: ${e.message}`,
data: "",
};

Expand Down