-
Notifications
You must be signed in to change notification settings - Fork 2.8k
V16: Updates openapi-ts client and deprecates tryExecuteAndNotify
#18939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…source-controller
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-18939.westeurope.6.azurestaticapps.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
tryExecuteAndNotify
has been deprecated, and developers should instead usetryExecute
, which now covers the same functionalitytryExecute
now has a requiredhost
parameter, and developers can mostly convert directly by referencingthis
:You can optionally suppress notifications by adding an options object:
Other changes
New features
tryExecute
will be of an UmbError instance such asUmbApiError
, which has a required problem details object among other thingsDependency Upgrades:
@hey-api/openapi-ts
from version0.61.3
to0.66.1
inpackage-lock.json
andpackage.json
. [1] [2]Error Handling Improvements:
ProblemDetails
withUmbProblemDetails
for 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:
UmbServerConnection
to extendUmbControllerBase
and usetryExecute
with the host parameter for improved server interaction and error handling. [1] [2] [3] [4]