Supporting PS Core and PS Desktop necessitates two possible requests for each API call in each cmdlet. Each have the responsibility for managing potential errors that may be returned.
This functionality should be decoupled from the cmdlets themselves to reduce the duplication of significant amounts of code in each cmdlet, and standardize the way requests and responses are managed throughout the module.
Develop a function to handle API Rest Requests
Develop a function to handle request errors
Standardize response/error return objects from the new functions
Supporting PS Core and PS Desktop necessitates two possible requests for each API call in each cmdlet. Each have the responsibility for managing potential errors that may be returned.
This functionality should be decoupled from the cmdlets themselves to reduce the duplication of significant amounts of code in each cmdlet, and standardize the way requests and responses are managed throughout the module.