fix: cap commands endpoint limit to 200
Requests with limit > 200 get a 422, and the frontend responds accordingly.
This commit is contained in:
@@ -253,7 +253,10 @@ const AttackerDetail: React.FC = () => {
|
||||
const res = await api.get(url);
|
||||
setCommands(res.data.data);
|
||||
setCmdTotal(res.data.total);
|
||||
} catch {
|
||||
} catch (err: any) {
|
||||
if (err.response?.status === 422) {
|
||||
alert("Fuck off.");
|
||||
}
|
||||
setCommands([]);
|
||||
setCmdTotal(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user