remove hard coded 500 errors from handleWeatherInternal
This commit is contained in:
parent
6e829eea30
commit
ffd87490cd
1 changed files with 2 additions and 10 deletions
|
|
@ -117,11 +117,7 @@ fn handleWeatherInternal(
|
||||||
res.body = "Location not found\n";
|
res.body = "Location not found\n";
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
else => {
|
else => return err,
|
||||||
res.status = 500;
|
|
||||||
res.body = "Internal server error\n";
|
|
||||||
return;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -133,11 +129,7 @@ fn handleWeatherInternal(
|
||||||
res.body = "Location not found\n";
|
res.body = "Location not found\n";
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
else => {
|
else => return err,
|
||||||
res.status = 500;
|
|
||||||
res.body = "Internal server error\n";
|
|
||||||
return;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
defer weather.deinit();
|
defer weather.deinit();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue