Skip to content

Commit 180e0f5

Browse files
andigclaude
andcommitted
chore: drop errorhandler fix, raised separately as #86
The JSON-body-on-abort fix is independent of the heating model and affects existing endpoints on main; it now lives in its own PR. The short-history rejection test only asserts the 400 status until #86 lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 493fe81 commit 180e0f5

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/optimizer/app.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ def handle_validation_error(error):
4545
error.data['details'] = error.data['errors']
4646
del error.data['errors']
4747
return error.data, 400
48-
elif error.data:
49-
# plain api.abort(400, message) calls carry only a message
50-
return error.data, 400
5148
else:
5249
raise error
5350

tests/test_heating.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ def test_api_heating_parameters_rejects_short_history():
8888
'history_temp': [45.0, 44.0],
8989
'history_energy': [100.0],
9090
})
91+
# note: JSON body assertion deliberately omitted — the errorhandler fix
92+
# making message-only aborts return JSON is raised separately (PR #86)
9193
assert response.status_code == 400
92-
assert 'too short' in response.json['message']
9394

9495

9596
def test_api_heating_roundtrip():

0 commit comments

Comments
 (0)