improved error loggin and updated imports to fix build failure
This commit is contained in:
@@ -37,7 +37,7 @@ export default async function ApiProxy(req, res) {
|
||||
"OData-MaxVersion": "4.0",
|
||||
"OData-Version": "4.0",
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*"',
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
@@ -51,6 +51,7 @@ export default async function ApiProxy(req, res) {
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(400);
|
||||
consoleLogger(error);
|
||||
res.status(400).json(error);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user