Skip to content

Don't return Internal Server Error for anything the user causes #344

Closed

Description

@jcjones

We saw an error come back over RPC from the RA to the WFE:

 [s>][RA.server][WFE->RA.wfe.efn-vm-wfe01] replying NewRegistration(eyJlcnJvciI6eyJ2YWx1ZSI6Imxvb2t1cCBrdWJhLmt1YmE6IG5vIHN1Y2ggaG9zdCIsInR5cGUiOiJJbnRlcm5hbFNlcnZlckVycm9yIn19) [Es8gjOXjP14SPb3rnBuGMh1HaadEYlSOjGIGRCVtc6M] 

Decoded, the message is:
{"error":{"value":"lookup kuba.kuba: no such host","type":"InternalServerError"}}

It's clear that kuba.kuba is not a valid host, and that the user gave us improper data, but this got labeled as an Internal Server Error, prompting our proxy to show a "we're in maintenance" condition.

It's standard practice that, if the web app returns >= 500, that the LB should replace the error with something user-friendly -- JSON or HTML or otherwise, because basically, >= 500 means the app crashed.

This is a situation where the app didn't crash, so we should instead be telling the user something useful, like "kuba.kuba" isn't resolvable.

Activity

  1. added this to the General Availability milestone on Jun 11, 2015
  2. jcjones commented on Jun 11, 2015

    @jcjones
    ContributorAuthor

    err = core.InternalServerError(err.Error())
    is not an internal server error. Basically, we need to evaluate every instance of core.InternalServerError

  3. kuba commented on Jun 11, 2015

    @kuba
    Contributor

    Note that it was an email address, it might be helpful to tell the user that email address at kuba.kuba is not resolvable rather than just kuba.kuba is not resolvable

  4. pde commented on Jun 11, 2015

    @pde
    Contributor

    @BradMW is working on a general triage and cleanup of error states. I think he'll have a plan for this and a number of other cases to present on the call today.

  5. jsha commented on Jun 11, 2015

    @jsha
    Contributor

    This is related to #115: There are already a handful of error types that specifically indicate certain client-facing errors. One of our problems was that, when using AMQP, full errors couldn't be returned across the queue. But @rolandshoemaker fixed this recently in #334, so yay!

  6. jcjones commented on Jun 11, 2015

    @jcjones
    ContributorAuthor

    I've got a patch in progress for this specific issue, @pde; I'm sure bradmw's will be a bigger, more comprehensive package.

  7. self-assigned this
    on Jun 11, 2015
  8. added 3 commits that reference this issue on Jun 12, 2015
  9. added a commit that references this issue on Jun 15, 2015
  10. kuba commented on Jun 17, 2015

    @kuba
    Contributor

    FYI, I'm still getting acme.messages2.Error: malformed :: The request message was malformed :: Error creating new registration for [email protected], Boulder=(master +383885d Wed Jun 17 09:11:57 UTC 2015) Golang=(go1.4) BuildHost=(ubuntu@ip-172-30-0-34)

  11. removed their assignment
    on Jun 24, 2015
  12. jsha commented on Sep 10, 2015

    @jsha
    Contributor

    The specific issue discussed here, 500's for invalid email addresses, is resolved. It's hard to reproduce locally using ./start.py, because dns-test-srv returns 127.0.0.1 for all lookups, but if you comment out the relevant section, you can get a nice 400 response.

    See also #700 for another issue around validation of email inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions