1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

fileinfo API tweaks

This commit is contained in:
Matthias Kretschmann 2020-09-02 13:18:48 +02:00
parent 49fe6456f9
commit 49ac2ba909
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ export default function FilesInput(props: InputProps): ReactElement {
const newFileInfo = await getFileInfo(url)
newFileInfo && helpers.setValue([newFileInfo])
} catch (error) {
toast.error('Could not fetch file info. Please check url and try again')
toast.error('Could not fetch file info. Please check URL and try again')
console.error(error.message)
} finally {
setIsLoading(false)

View File

@ -50,7 +50,7 @@ export async function getFileInfo(url: string): Promise<FileMetadata> {
data: { url }
})
if (response.status > 299 || !response.data.result) {
if (response.status > 299 || !response.data) {
toast.error('Could not connect to File API')
return
}