Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public getFileUrl = async (path: string, bucket: string) => {
try {
return await this.http.get(routes.FileUrl(bucket, path))
} catch (e) {
if (e.statusCode === 404 || pathEq(['response', 'status'], 404, e)) {
throw new NotFoundError(e)
} else {
throw e
}
}
}