Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit ed8a03b

Browse files
author
Libor Pansky
committed
#378 Check message prop instead of errorMessage
1 parent 7b29901 commit ed8a03b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- Added support for tax calculation where the values from customer_tax_class_ids is used - @resubaka (#307)
2626
- The `db` context object - passed to every api endpoint now has two usefull methods: `getElasticClient` and `getRedisClient` for accesing the data stores - @pkarw (#328)
2727
- The `lib/utils` got two new methods `getStoreCode(req: Express.Request)` and `getStoreView(code: string)` for getting the current multistore context from `vue-storefront` frontend requests - @pkarw
28+
- Check message property instead of errorMessage in apiError function - @cdshotels-liborpansky (#378)
2829

2930
### Removed
3031
- The `scripts/seo.js` tool has been removed, the legacy `migrations` scripts have been removed, the unused legacy extensions (`gls-parcelshop-dk`, `postnord-parcelshop-dk`) - @pkarw (#342)

src/lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function apiStatus (res, result = 'OK', code = 200, meta = null) {
8484
* @param {json} [result='OK'] Text message or result information object
8585
*/
8686
export function apiError (res, errorObj, code = 500) {
87-
return apiStatus(res, errorObj.errorMessage ? errorObj.errorMessage : errorObj, errorObj.code ? errorObj.code : 500)
87+
return apiStatus(res, errorObj.message ? errorObj.message : errorObj, errorObj.code ? errorObj.code : 500)
8888
}
8989

9090
export function encryptToken (textToken, secret) {

0 commit comments

Comments
 (0)