Git Product home page Git Product logo

Comments (7)

hartsick avatar hartsick commented on September 3, 2024

Blocked on USPS requirements and procurement of address validation provider (eg Smarty)

from test-at-home.

porta-antiporta avatar porta-antiporta commented on September 3, 2024

Dependent on #57

from test-at-home.

hartsick avatar hartsick commented on September 3, 2024

@porta-antiporta One thing we should specify is desired behavior if validation API is not working (just save? sanity checks on specific fields?)

from test-at-home.

porta-antiporta avatar porta-antiporta commented on September 3, 2024

@hartsick if validation API is not working then we should throw an error (if transient failure for one user) or stop taking orders (if complete outage). Sanity checks aren't sufficient as we have to confirm deliverability before saving an order.

The latter is undesirable, but we can't store an order without validating the address for deliverability as we are unsure if we can get a hold of the user in the future. So if we think validation API is not reliable, we should be thinking about redundancy/fallback options (offline USPS? pinging online USPS?).

from test-at-home.

porta-antiporta avatar porta-antiporta commented on September 3, 2024

Opened #60 seeing resiliency of API is likely pretty meaty in and of itself. (And likely not ready by Th).

from test-at-home.

porta-antiporta avatar porta-antiporta commented on September 3, 2024

Updated to AC reflect findings from #57

from test-at-home.

hartsick avatar hartsick commented on September 3, 2024

@porta-antiporta I think that this is done based on what we had discussed. We're still waiting on contract from Smarty, so using developer accounts with limited rates for time being. Here is the approach we went with for now:

Normal path

  1. Javascript check for deliverability. Requester sees different errors for no matches found for their search and if there is a match found but it's dpv_match_code of D. We could probably use better error messages for latter
  2. On final submission, server-side check for deliverability. Requester will see same errors as described in Javascript above (though they shouldn't see them if they have Javascript enabled)
  3. We do not correct the address. Instead, we save what the requester input and save whatever came back from the server, so we can reference when sending to USPS.

API erroring path
If for some reason the API gives an error, we skip the address validation for that request (so, if front end call errored they may still get caught by server-side validation). If it is the backend validation that errored, we accept the request but mark that the address was not validated in the database (attribute address_validated=false). This should handle any intermittent errors, such as a temporarily unavailable service or a cooldown for exceeded rate limit.

Support for turning off Smarty
This is still in-progress (as part of #67), but right now we allow for turning off server-side validations entirely (so that we can deploy a parallel application). We still need to allow disabling front-end address validations.

from test-at-home.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.