diff options
| author | Adam Soltys <[email protected]> | 2015-11-24 10:07:57 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2015-11-27 22:02:48 -0800 |
| commit | 9d4926c942928333ce9436649fe47abd3399003a (patch) | |
| tree | 947c1469316c53627b681ebcee62b44c0bbb5568 /src | |
| parent | 7db9ced7b02fac057c97460069ba800b6db2e391 (diff) | |
| download | coinos-server-9d4926c942928333ce9436649fe47abd3399003a.tar.gz coinos-server-9d4926c942928333ce9436649fe47abd3399003a.zip | |
Error handling
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/users.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/users.coffee b/src/routes/users.coffee index 5daae180..cc5a9be6 100644 --- a/src/routes/users.coffee +++ b/src/routes/users.coffee @@ -40,7 +40,8 @@ module.exports = (sessions) -> path = "public/assets/img/logos/#{obj.username}.#{ext}" fs.lstat(path, (err, stats) -> if ext in ['jpg', 'png', 'gif'] and (err or not stats.isFile()) - request("#{obj.logo}").pipe(fs.createWriteStream(path)) + try + request("#{obj.logo}").pipe(fs.createWriteStream(path)) ) res.render('users/show', options) |
