Skip to content

Commit

Permalink
fix typo, better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Feb 1, 2024
1 parent 062e170 commit 8469999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/app-api/src/authn/thirdPartyAuthn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export async function userFromThirdPartyAuthorizer(
const allowedIpAddresses = process.env.ALLOWED_IP_ADDRESSES
if (allowedIpAddresses === undefined || allowedIpAddresses === '') {
throw new Error(
'Configuration Error: ALLOWD_IP_ADDRESSES is required to run app-api.'
'Configuration Error: ALLOWED_IP_ADDRESSES is required to run app-api.'
)
}
try {
const ipAddressIsValid = allowedIpAddresses.includes(ipAddress)
if (!ipAddressIsValid) {
const errMsg = new Error('bad ip address')
const errMsg = new Error('IP address is not in the allowed list')
return err(errMsg)
}
// Lookup user from postgres
Expand Down

0 comments on commit 8469999

Please sign in to comment.