Observed behavior
(function requestAuthKwartoToken() {
axios.post(`${process.env.KWARTO_URL}/api/v0.1/authentications/authorize/token`, {
'client_realm': process.env.CLIENT_REALM,
'client_id': process.env.CLIENTS_ID,
'client_username': process.env.CLIENTS_USERNAME,
'client_password': process.env.CLIENTS_PASSWORD,
'user_email': process.env.USERS_EMAIL
}).then(authenticationResponse => {
process.env.ACCESS_TOKENS = authenticationResponse.data.access_token;
console.log("🚀 ~ file: app.js:75 ~ requestAuthToken ~ authenticationResponse.data.access_token:", authenticationResponse.data.access_token)
})
.catch(function (err) {
console.log("🚀 ~ file: app.js:78 ~ requestAuthKwartoToken ~ err:", err)
// return null
})
setTimeout(requestAuthKwartoToken, 12 * 60 * 60 * 1000); // 12 hours
})();
{
field: 'liens vers la maquette',
type: 'String',
get: place => {
if (place.kwartoId != null) {
return axios.get(`https://${process.env.CLIENT_REALM}.kwarto.immo/webapp/#/buildingsets/${place.kwartoId}`,
{
headers: {
'Authorization': `Bearer ${process.env.ACCESS_TOKENS}`,
},
}).then(res => {
console.log("🚀 ~ file: places.js:2012 ~ res:", res)
return res.data.kwartoId;
});
}
}
}```
## Failure Logs
[forest] Cannot set the liens vers la maquette value because of an unexpected error: unable to verify the first certificate
{
“stack”: “Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)\n at TLSSocket.emit (node:events:526:28)\n at TLSSocket._finishInit (node:_tls_wrap:944:8)\n
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)”,
“config”: {
“url”: “https://maquettecopro.kwarto.immo/webapp/#/buildingsets/eee1b0b6-2e05-4cde-8973-f20de229ed83”,
“method”: “get”,
“headers”: {
“Accept”: “application/json, text/plain, /”,
“Authorization”: "Bearer ",
“User-Agent”: “axios/0.21.1”
},
“transformRequest”: [
null
],
“transformResponse”: [
null
],
“timeout”: 0,
“xsrfCookieName”: “XSRF-TOKEN”,
“xsrfHeaderName”: “X-XSRF-TOKEN”,
“maxContentLength”: -1,
“maxBodyLength”: -1
},
“code”: “UNABLE_TO_VERIFY_LEAF_SIGNATURE”
}```
Context
Project name: .Sergic
Team name: gestion
Environment name: Développement
Agent (forest package) name & version: 9
Database type: Postgres
Recent changes made on your end if any: upgrade to v9