Skip to content

Better error messages on osc #1516

Closed
Closed

Description

@fabianofranz

As a follow-up of #992 we need a reliable mechanism to customize the error messages that end up being printed in osc. Will probably require a printer of messages upstream, that is used for example by the commands under kubectl that we reuse.

We need to replace for example, for first-time users, things like No server found for with You need to log in, use 'osc login', etc.

Activity

  1. fabianofranz commented on Mar 31, 2015

    @fabianofranz
    ContributorAuthor
  2. smarterclayton commented on Mar 31, 2015

    @smarterclayton
    Contributor

    The factory should have an interface for these sorts of things (utility messages, generic error handling).

  3. sosiouxme commented on Mar 31, 2015

    @sosiouxme
    Member

    +1000

    Any chance we can intercept k8s glogs and give something user-friendly?

  4. smarterclayton commented on Mar 31, 2015

    @smarterclayton
    Contributor

    There are no more glog fatals upstream. There would only be glog errors, which should be omitting the ugly prefix when verbosity is at lower levels. That issue is still open.

  5. brenton commented on May 13, 2015

    @brenton
    Contributor

    I'm guessing this is related. It would be nice if login failures didn't default to dumping the error message. Here's an example of what happens when you type the wrong password and are using the RequestHeaderIdentityProvider:

    [demo@dev origin]$ osc login 192.168.133.100:443
    Username: demo
    Authentication required for https://192.168.133.100:443 (openshift)
    Password: 
    Login failed (401 Unauthorized)
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>401 Unauthorized</title>
    </head><body>
    <h1>Unauthorized</h1>
    <p>This server could not verify that you
    are authorized to access the document
    requested.  Either you supplied the wrong
    credentials (e.g., bad password), or your
    browser doesn't understand how to supply
    the credentials required.</p>
    </body></html>
    

    Here's another issue that shows what happens when token expires: #2132. It definitely seems weird to print "Unauthorized" twiece whenever tokens expire.

  6. modified the milestone: 1.1.0 on Jun 17, 2015
  7. removed this from the 1.1.0 milestone on Sep 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions