Commit d2e7578b authored by yann300's avatar yann300

better error message

parent ae58533e
...@@ -587,7 +587,9 @@ export const FileExplorer = (props: FileExplorerProps) => { ...@@ -587,7 +587,9 @@ export const FileExplorer = (props: FileExplorerProps) => {
fn: () => {} fn: () => {}
}) })
} else { } else {
modal('Publish to gist Failed', data.message + ' ' + data.documentation_url + ' ' + JSON.stringify(data.errors, null, '\t'), { const error = JSON.stringify(data.errors, null, '\t') || ''
const message = data.message === 'Not Found' ? data.message + '. Please make sure the API token has right to create a gist.' : data.message
modal('Publish to gist Failed', message + ' ' + data.documentation_url + ' ' + error, {
label: 'Close', label: 'Close',
fn: async () => {} fn: async () => {}
}, null) }, null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment