Add AccountsAPIError class and productvoucher route

Introduces a custom AccountsAPIError class for consistent error handling and serialization. Adds a new /productvoucher/giftcode route that returns a 404 error response for unimplemented endpoints.
This commit is contained in:
2025-12-25 17:54:40 +01:00
parent 97ae0c43f0
commit 228345c859
2 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
const express = require("express")
const router = express.Router()
router.get("/giftcode", (req, res) => {
res.status(404).json({
path: "/productvoucher/giftcode",
errorType: "NOT_FOUND",
error: "NOT_FOUND",
errorMessage: "The server has not found anything matching the request URI",
developerMessage: "The server has not found anything matching the request URI"
})
})
module.exports = router