Skip to content

Commit

Permalink
Merge pull request #208 from o2r-project/issues
Browse files Browse the repository at this point in the history
catch errors to resolve #207
  • Loading branch information
njakuschona authored Apr 23, 2021
2 parents a635fc9 + 40239bf commit 419dc92
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion ui/bindings/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rocker/geospatial:3.6.2
FROM rocker/geospatial:3.6.3

SHELL ["/bin/bash", "-c"]

Expand All @@ -9,6 +9,10 @@ RUN R -e 'install.packages(c("rioja", "FME", "SoilR", "verification", "MASS", "s
RUN R -e 'install.packages(c("caTools", "Cairo", "stats", "extrafont", "xts", "maps"))'
RUN R -e 'install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)'
RUN R -e 'install.packages(c("truncnorm"))'
#update of package raster needed to run specific bindings
RUN R -e 'install.packages(c("raster"))'


# based on https://gist.github.com/remarkablemark/aacf14c29b3f01d6900d13137b21db3a
RUN apt-get update \
&& apt-get install -y curl \
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/erc/ERC.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class ERC extends React.Component {
}
}
})
.catch(function (res) {
console.log(res)
.catch(function (response) {
console.log(response)
})
}

Expand Down
8 changes: 6 additions & 2 deletions ui/src/components/uploadERC/Dropzone/Dropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ class Dropzone extends Component {
});
})
.catch((response) => {
if (response.response.status === 401) {
if(!response.response){
self.setUpperState({ title: "ERC Upload failed", errorMessage: "Something went wrong. Please try it again in a new window or different Browser." })
}
else if (response.response.status === 401) {
self.setUpperState({ title: "ERC Upload failed", errorMessage: "You have to be logged in to upload a Workspace" })
} else if (response.response.status === 500) {
}
else if (response.response.status === 500) {
self.setUpperState({ title: "ERC Upload failed", errorMessage: "You must select an ERC to upload" })
}
})
Expand Down

0 comments on commit 419dc92

Please sign in to comment.