mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
fix error message
This commit is contained in:
@@ -45,7 +45,7 @@ class App extends Component {
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
pdfIsLoading: false,
|
||||
pdfError: error,
|
||||
pdfError: error.message,
|
||||
pdfUrl: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,8 +7,7 @@ export function generatePdf(state){
|
||||
body: JSON.stringify(state)
|
||||
}).then(function(res) {
|
||||
if (res.status !== 200) {
|
||||
console.error('request failed');
|
||||
return;
|
||||
throw new Error(`Something went wrong (Status ${res.status}) - I do feel very sorry!`);
|
||||
}
|
||||
return res.json();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user