Refactor #28362
closedFix API Middleware failure payload
Updated by The Foreman Bot about 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/7211 added
Updated by Tomer Brisker about 5 years ago
- Category set to JavaScript stack
- Assignee set to Ron Lavi
What failure? when?
Issues with no info aren't very useful when they just appear here from a bot so there is no one to ask for further information.
Noone outside of the asana users know if someone is already working on an issue or try to fix them before they are copied from asana, and the reviewer has no background to what the PR is trying to fix.
Updated by Ron Lavi about 5 years ago
From: `payload: { error, payload }`
To: `payload: { ...payload, error }`
the `payload` data will be accessed in the `reducer` as `payload` instead of `payload.payload`
Updated by Ron Lavi about 5 years ago
Sorry about that, we started to use the bot and I forgot to add some description before it will generate it automatically.
Update the info above,
basically the change is in the payload object which is being accessed in the reducer
Updated by Tomer Brisker about 5 years ago
The comment you added describes the change you did in the pr, not why it is needed, what is the bug it is trying to fix or how it can be reproduced and tested.
Updated by Ron Lavi about 5 years ago
- Tracker changed from Bug to Refactor
thanks, actually it is more of a refactoring, not a bug
so it will look cleaner to access the payload of an API call failure:
From: `payload: { error, payload }`
To: `payload: { ...payload, error }`
the `payload` data will be accessed in the `reducer` as `payload` instead of `payload.payload`
Updated by Ron Lavi about 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 7acac44c53c996bcdfa49a2e2785d0773ab934b8.