You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve error message for 'package-registry publish' (#6576)
* Improve error message for 'package-registry publish'
Motivation:
When registry publish fails with client error, the current error message is "Error: failed publishing: invalid registry response status '400', expected '[201, 202]'", which doesn't provide much information on what went wrong.
rdar://109410245
Modifications:
- Wrap 4xx status response in `RegistryError.clientError` and 5xx in `RegistryError.serverError`. Both errors include response body as details.
- Change `package-registry publish` to throw the wrapped `clientError` such that more details (i.e., response body) get displayed.
* Don't lose failedPublishing context
0 commit comments