Skip to content

Commit 9725baf

Browse files
Change error type when session is missing (#278)
1 parent bd24244 commit 9725baf

File tree

1 file changed

+3
-1
lines changed
  • src/server/plugins/postcode-lookup/routes

1 file changed

+3
-1
lines changed

src/server/plugins/postcode-lookup/routes/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ function getSessionState(request) {
2929
const state = request.yar.get(JOURNEY_BASE_URL)
3030

3131
if (!state) {
32-
throw Boom.internal(`No postcode lookup data found for ${JOURNEY_BASE_URL}`)
32+
throw Boom.badRequest(
33+
`No postcode lookup data found for ${JOURNEY_BASE_URL}`
34+
)
3335
}
3436

3537
return state

0 commit comments

Comments
 (0)