Skip to content

Conversation

@gustaavik
Copy link
Member

This pull request introduces several updates to improve code clarity, error handling, and functionality across multiple files. Key changes include enhancements to Docker commands in the Makefile, improved error handling in the load function for fetching currencies and categories, and removal of unnecessary logging in the currency mapper.

Makefile updates:

  • Removed the redundant docker-build command and streamlined the docker-build-tag command by eliminating the latest tag.
  • Simplified the docker-push command by removing the push operation for the latest tag.

Error handling improvements:

  • Updated the load function in src/routes/admin/products/new/+page.server.ts to use Promise.allSettled for fetching currencies and categories, adding robust error handling for rejected promises.
  • Refactored the load function to ensure proper fallback values for currencies and categories in case of errors.

Code cleanup:

  • Removed a console.log statement from the currency.mapper.ts file to reduce unnecessary logging.

@gustaavik gustaavik merged commit d2308bd into main Jul 12, 2025
@gustaavik gustaavik deleted the fix-load-currency-error branch July 12, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants