Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server errors on incomplete addresses #4

Open
giacecco opened this issue Jan 21, 2015 · 9 comments
Open

Internal server errors on incomplete addresses #4

giacecco opened this issue Jan 21, 2015 · 9 comments
Assignees
Labels

Comments

@giacecco
Copy link
Contributor

Basic requests like the one below - where the postcode is missing - return an internal server error (oddly formatted as HTML, too):

.../~$ curl --data "address=22 greenway berkhamsted" https://sorting-office.openaddressesuk.org/address
<h1>Internal Server Error</h1>.../~$ 

An incomplete address should be recognised as such, possibly with a null postcode result. What do you reckon?

@giacecco giacecco added the bug label Jan 21, 2015
@giacecco giacecco changed the title Internal server error Internal server errors on incomplete addresses Jan 21, 2015
@pezholio
Copy link
Member

This is now done. A request without a postcode now returns a 400 header and an error message.

@giacecco
Copy link
Contributor Author

@pezholio sorry but I don't think that is correct. An address without a postcode is still worth parsing. We'll have plenty coming from one of the partners we may be working soon. I believe we should manage missing postcodes in the same way we manage missing towns etc.

@giacecco giacecco reopened this Jan 21, 2015
@pezholio
Copy link
Member

Parsing anything without a postcode is going to be difficult as the parsing all cascades down from there. For example, when we match a town, we check if it's in the right postcode area first, otherwise we can't be sure where we're getting the town from. Similarly, with localities we check the locality match is within reasonable bounds before accepting it, same with streets too.

@giacecco
Copy link
Contributor Author

Worth having a chat with @MurrayData about this? there must be a sensible way of parsing postcode-less addresses

@pezholio
Copy link
Member

Possibly, but it will add a quite heavy layer of complexity I'd imagine. The logic is similar to the way he worked through addresses in the Companies House ETL (albeit without the ElasticSearch layer)

@giacecco
Copy link
Contributor Author

Please proceed, at least to assess the complexity. We will decide together if it is worth proceeding to implementation and well.

@pezholio
Copy link
Member

I think this should be considered an addition, as the original brief was:

"Re-write as a re-usable software component the algorithm that is currently part of the Corporates House ETL that interprets free-text addresses."

@giacecco
Copy link
Contributor Author

Fine, but can you make the chat with John within the original points?

@pezholio
Copy link
Member

Yeah, no probs 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants