Skip to content

Better error message on publish when crate is too big #1709

Closed
@carols10cents

Description

@carols10cents

Not sure yet if this is a crates.io problem, a cargo problem, or both, but someone was having trouble publishing and cargo only printed that it got a 503 response, so it took time to figure out that the problem was their .crate was over the 10MB size limit.

The code looks like we're returning a nice error, but the output they got from cargo was:

error: failed to get a 200 OK response, got 503
headers:
    HTTP/1.1 100 Continue

    

    HTTP/1.1 503 Service Unavailable

    Connection: keep-alive

    Server: Cowboy

    Date: Sat, 06 Apr 2019 10:50:38 GMT

    Content-Length: 506

    Content-Type: text/html; charset=utf-8

    Cache-Control: no-cache, no-store

    

body:
<!DOCTYPE html>
    <html>
      <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta charset="utf-8">
        <title>Application Error</title>
        <style media="screen">
          html,body,iframe {
            margin: 0;
            padding: 0;
          }
          html,body {
            height: 100%;
            overflow: hidden;
          }
          iframe {
            width: 100%;
            height: 100%;
            border: 0;
          }
        </style>
      </head>
      <body>
        <iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
      </body>
    </html>

so it looks like cargo is hitting this arm when it should be hitting this arm and printing the error message returned from crates.io. So something isn't quite right and it seems like it's on the crates.io side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions