Skip to content
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
6 changes: 3 additions & 3 deletions frontend/src/actions/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function handleErrors(reason, originalFunc){
return (dispatch) => {
dispatch({
type: NOT_AUTHORIZED,
reason: "Forbidden",
reason: reason.body.detail,
stack: reason.stack ? reason.stack : "",
receivedAt: Date.now()
});
Expand All @@ -73,7 +73,7 @@ export function handleErrors(reason, originalFunc){
return (dispatch) => {
dispatch({
type: NOT_FOUND,
reason: "Not Found",
reason: reason.body.detail,
stack: reason.stack ? reason.stack : "",
receivedAt: Date.now()
});
Expand All @@ -82,7 +82,7 @@ export function handleErrors(reason, originalFunc){
return (dispatch) => {
dispatch({
type: FAILED,
reason: reason.message !== undefined? reason.message : "Backend Failure. Couldn't fetch!",
reason: reason.body.detail !== undefined? reason.body.detail : "Backend Failure. Couldn't fetch!",
stack: reason.stack ? reason.stack : "",
receivedAt: Date.now()
});
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ export const Explore = (): JSX.Element => {
setErrorOpen(false);
}
const handleErrorReport = () => {
window.open(`${config.GHIssueBaseURL}+${reason}&body=${encodeURIComponent(stack)}`);
}
window.open(
`${config.GHIssueBaseURL}+${encodeURIComponent(reason)}&body=${encodeURIComponent(stack)}`
);
};

// fetch thumbnails from each individual dataset/id calls
useEffect(() => {
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/datasets/CreateDataset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ export const CreateDataset = (): JSX.Element => {
setErrorOpen(false);
}
const handleErrorReport = () => {
window.open(`${config.GHIssueBaseURL}+${reason}&body=${encodeURIComponent(stack)}`);
}
window.open(
`${config.GHIssueBaseURL}+${encodeURIComponent(reason)}&body=${encodeURIComponent(stack)}`
);
};

// step 1
const onDatasetSave = (formData:any) =>{
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/datasets/Dataset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ export const Dataset = (): JSX.Element => {
dismissError();
setErrorOpen(false);
};
const handleErrorReport = (reason: string) => {
const handleErrorReport = () => {
window.open(
`${config.GHIssueBaseURL}+${reason}&body=${encodeURIComponent(stack)}`
`${config.GHIssueBaseURL}+${encodeURIComponent(reason)}&body=${encodeURIComponent(stack)}`
);
};

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/files/File.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ export const File = (): JSX.Element => {
dismissError();
setErrorOpen(false);
};
const handleErrorReport = (reason: string) => {
const handleErrorReport = () => {
window.open(
`${config.GHIssueBaseURL}+${reason}&body=${encodeURIComponent(stack)}`
`${config.GHIssueBaseURL}+${encodeURIComponent(reason)}&body=${encodeURIComponent(stack)}`
);
};

Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/listeners/ExtractionHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ export const ExtractionHistory = (): JSX.Element => {
setErrorOpen(false);
}
const handleErrorReport = () => {
window.open(`${config.GHIssueBaseURL}+${reason}&body=${encodeURIComponent(stack)}`);
}
window.open(
`${config.GHIssueBaseURL}+${encodeURIComponent(reason)}&body=${encodeURIComponent(stack)}`
);
};

return (
<Layout>
Expand Down