V16: Updates openapi-ts client and deprecates tryExecuteAndNotify#18939
V16: Updates openapi-ts client and deprecates tryExecuteAndNotify#18939leekelleher merged 45 commits intov16/devfrom
tryExecuteAndNotify#18939Conversation
…source-controller
There was a problem hiding this comment.
Copilot reviewed 174 out of 176 changed files in this pull request and generated no comments.
Files not reviewed (2)
- src/Umbraco.Web.UI.Client/package-lock.json: Language not supported
- src/Umbraco.Web.UI.Client/package.json: Language not supported
Comments suppressed due to low confidence (3)
src/Umbraco.Web.UI.Client/src/packages/core/object-type/object-type.repository.ts:17
- Ensure the updated tryExecute call still handles error notification or propagation appropriately, as the behavior may differ from tryExecuteAndNotify.
return tryExecute(this.#host, ObjectTypesService.getObjectTypes({}));
src/Umbraco.Web.UI.Client/devops/openapi-ts/openapi-ts.config.js:4
- Review the removal of the 'client' property in favor of adding the 'legacy/fetch' plugin to ensure that legacy fetch functionality is preserved.
export default defineConfig({
src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts:149
- Verify that the new instance-based initialization of the API interceptor does not impact the expected binding of interceptors, ensuring consistent API error handling.
this.#apiInterceptorController.bindDefaultInterceptors(OpenAPI);
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-18939.westeurope.6.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-18939.westeurope.6.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-18939.westeurope.6.azurestaticapps.net |
…source-controller
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-18939.westeurope.6.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-18939.westeurope.6.azurestaticapps.net |
leekelleher
left a comment
There was a problem hiding this comment.
I've tested this out around the backoffice, all areas are working as expected.
I also tried adding custom notifications (via INotificationHandler<T>) and they still work nicely too! 🚀
I'm happy with the initial review of the code changes. I'm sure there will be refinements in the next PRs. 😎
…oved around introduced in #18939
|
@iOvergaard Maybe you should add some documentation on how actually to call/implement custom backoffice APIs for the new backoffice. Because I had to guess and look at source code to work out how to at least get something that worked. There is some documentation on the server-side, but absolutely nothing on the client-side. The most annoying thing about the new backoffice is the complete lack of documentation for even the most basic of tasks. |
|
@arknu That is an interesting topic to document; There is nothing here specific to Umbraco apart from how to borrow/hook onto the access token from Umbraco for your API calls-- and that, I agree, is not documented very well. Hint: Try to run the command |
Description
This pull request includes several changes to improve the codebase, update dependencies, and enhance error handling. The most important changes include dependency upgrades and modifications to error handling and server connection logic.
Breaking changes
tryExecuteAndNotifyhas been deprecated, and developers should instead usetryExecute, which now covers the same functionalitytryExecutenow has a requiredhostparameter, and developers can mostly convert directly by referencingthis:You can optionally suppress notifications by adding an options object:
Other changes
New features
tryExecutewill be of an UmbError instance such asUmbApiError, which has a required problem details object among other thingsDependency Upgrades:
@hey-api/openapi-tsfrom version0.61.3to0.66.1inpackage-lock.jsonandpackage.json. [1] [2]Error Handling Improvements:
ProblemDetailswithUmbProblemDetailsfor better error handling and consistency across various files (app-error.element.ts,installer-database.element.ts,installer-error.element.ts). [1] [2] [3] [4]Server Connection Enhancements:
UmbServerConnectionto extendUmbControllerBaseand usetryExecutewith the host parameter for improved server interaction and error handling. [1] [2] [3] [4]