You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic of API endpoints, which are getting data from the backend (get....), raised some concerns from @blargly :
When it fails to get data, the function will return the "full shape" object with all of the params going along with an empty string, 0 or null, or false ... --> This may not be necessary and be not good to maintain
For example:
When it fails to fetch data, the function should return "null" --> This means that the Promise and "request" objects will need to be < type_we_need | null> --> Then we can do something with the returning "null" later
If we change the Promise and returning types, we need to consider every part of the code that is related to the API endpoint in the whole codebase, to see why the "full shape" object should be in the original code (if there are any reasons) and how this change will affect the UI and the current jobs ...
The text was updated successfully, but these errors were encountered:
Yes I agree - this is a bit of debt we were basically fine with introducing as it works, is necessary for Next to build, and the early stages of the Next work had other priorities. This is still quite low priority though, and shouldn't be much work to undo.
The logic of API endpoints, which are getting data from the backend (get....), raised some concerns from @blargly :
For example:
When it fails to fetch data, the function should return "null" --> This means that the Promise and "request" objects will need to be < type_we_need | null> --> Then we can do something with the returning "null" later
If we change the Promise and returning types, we need to consider every part of the code that is related to the API endpoint in the whole codebase, to see why the "full shape" object should be in the original code (if there are any reasons) and how this change will affect the UI and the current jobs ...
The text was updated successfully, but these errors were encountered: