Skip to content

Commit

Permalink
If ADR, ADR1-3 is missing, we set unknown and move on in life
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgtho committed Sep 28, 2022
1 parent 0b6f0cc commit 616a1f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const callArchive = async (payload, e18JobId, e18TaskId, endpoint) => {
return data
} catch (error) {
const { status, message, data } = error.response
if (status === 404 && endpoint === 'SyncElevmappe') {
if ((status === 404 && endpoint === 'SyncElevmappe') || (data && data.error && data.error === 'VANLIG BOSATT, mangler ADR og ADR1-3')) {
logger('info', ['archive', 'aiaiaiaiai', status, message || data])
return false
}
Expand Down Expand Up @@ -235,6 +235,7 @@ module.exports.archiveResponseLetter = async (blobContent) => {
]
}
}
// If not address block or invavid address, we send it awayyyy!
} else {
logger('info', ['archive', 'archiveResponseLetter', 'address is ok, will create and archive response letter'])
payload = {
Expand Down

0 comments on commit 616a1f2

Please sign in to comment.