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.
14 lines
442 B
JavaScript
14 lines
442 B
JavaScript
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 |