Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
enedis_sge_konnector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
enedis_sge_konnector
Commits
d03863a4
Commit
d03863a4
authored
2 years ago
by
Bastien DUMONT
Browse files
Options
Downloads
Patches
Plain Diff
fix: wrong error message login failed
parent
d8820eb1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!16
Feat/us843 wrong error message issue 276
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/core/contractActivation.js
+6
-4
6 additions, 4 deletions
src/core/contractActivation.js
src/core/contractVerification.js
+6
-4
6 additions, 4 deletions
src/core/contractVerification.js
src/core/findUserPdl.js
+6
-4
6 additions, 4 deletions
src/core/findUserPdl.js
src/index.js
+1
-1
1 addition, 1 deletion
src/index.js
with
19 additions
and
13 deletions
src/core/contractActivation.js
+
6
−
4
View file @
d03863a4
...
@@ -58,10 +58,12 @@ async function activateContract(
...
@@ -58,10 +58,12 @@ async function activateContract(
return
parseServiceId
(
parsedReply
)
return
parseServiceId
(
parsedReply
)
}
catch
(
error
)
{
}
catch
(
error
)
{
log
(
'
error
'
,
'
Error while activating contract:
'
+
error
)
log
(
'
error
'
,
'
Error while activating contract:
'
+
error
)
log
(
if
(
parsedReply
.
Envelope
.
Body
.
Fault
)
{
'
error
'
,
log
(
`Enedis issue
${
parsedReply
.
Envelope
.
Body
.
Fault
.
detail
.
erreur
.
resultat
.
$
.
code
}
:
${
parsedReply
.
Envelope
.
Body
.
Fault
.
faultstring
}
`
'
error
'
,
)
`Enedis issue
${
parsedReply
.
Envelope
.
Body
.
Fault
.
detail
.
erreur
.
resultat
.
$
.
code
}
:
${
parsedReply
.
Envelope
.
Body
.
Fault
.
faultstring
}
`
)
}
//TODO: handle SGT4B8: Il existe déjà plusieurs demandes en cours sur le point ?
//TODO: handle SGT4B8: Il existe déjà plusieurs demandes en cours sur le point ?
throw
errors
.
LOGIN_FAILED
throw
errors
.
LOGIN_FAILED
}
}
...
...
This diff is collapsed.
Click to expand it.
src/core/contractVerification.js
+
6
−
4
View file @
d03863a4
...
@@ -63,10 +63,12 @@ async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
...
@@ -63,10 +63,12 @@ async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
return
null
return
null
}
catch
(
error
)
{
}
catch
(
error
)
{
log
(
'
error
'
,
'
Error while parsing user contract:
'
+
error
)
log
(
'
error
'
,
'
Error while parsing user contract:
'
+
error
)
log
(
if
(
parsedReply
.
Envelope
.
Body
.
Fault
)
{
'
error
'
,
log
(
`Enedis issue
${
parsedReply
.
Envelope
.
Body
.
Fault
.
detail
.
erreur
.
resultat
.
$
.
code
}
:
${
parsedReply
.
Envelope
.
Body
.
Fault
.
faultstring
}
`
'
error
'
,
)
`Enedis issue
${
parsedReply
.
Envelope
.
Body
.
Fault
.
detail
.
erreur
.
resultat
.
$
.
code
}
:
${
parsedReply
.
Envelope
.
Body
.
Fault
.
faultstring
}
`
)
}
throw
errors
.
LOGIN_FAILED
throw
errors
.
LOGIN_FAILED
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/core/findUserPdl.js
+
6
−
4
View file @
d03863a4
...
@@ -50,10 +50,12 @@ async function findUserPdl(
...
@@ -50,10 +50,12 @@ async function findUserPdl(
return
parseUserPdl
(
parsedReply
)
return
parseUserPdl
(
parsedReply
)
}
catch
(
error
)
{
}
catch
(
error
)
{
log
(
'
error
'
,
'
Error while parsing user PDL:
'
+
error
)
log
(
'
error
'
,
'
Error while parsing user PDL:
'
+
error
)
log
(
if
(
parsedReply
.
Envelope
.
Body
.
Fault
)
{
'
error
'
,
log
(
`Enedis issue
${
parsedReply
.
Envelope
.
Body
.
Fault
.
detail
.
erreur
.
resultat
.
$
.
code
}
:
${
parsedReply
.
Envelope
.
Body
.
Fault
.
faultstring
}
`
'
error
'
,
)
`Enedis issue
${
parsedReply
.
Envelope
.
Body
.
Fault
.
detail
.
erreur
.
resultat
.
$
.
code
}
:
${
parsedReply
.
Envelope
.
Body
.
Fault
.
faultstring
}
`
)
}
throw
errors
.
LOGIN_FAILED
throw
errors
.
LOGIN_FAILED
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/index.js
+
1
−
1
View file @
d03863a4
...
@@ -168,7 +168,7 @@ async function start(fields, cozyParameters) {
...
@@ -168,7 +168,7 @@ async function start(fields, cozyParameters) {
consentId
:
consent
.
ID
,
consentId
:
consent
.
ID
,
})
})
}
else
{
}
else
{
//
Alternate
S
tart
log
(
'
info
'
,
'
Alternate
s
tart
...
'
)
const
accountData
=
await
getAccount
(
ACCOUNT_ID
)
const
accountData
=
await
getAccount
(
ACCOUNT_ID
)
const
userConsent
=
await
getBoConsent
(
const
userConsent
=
await
getBoConsent
(
boBaseUrl
,
boBaseUrl
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment