Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message to output #58

Open
cagrimmett opened this issue Nov 7, 2024 · 0 comments
Open

Add error message to output #58

cagrimmett opened this issue Nov 7, 2024 · 0 comments

Comments

@cagrimmett
Copy link

This is the output we see on the command line with an error:

❌ API error (500 https://opsoasis.wpspecialprojects.com/wp-json/wpcomsp/pressable/v1/sites): {"code":400,"message":"Bad Request","data":null}

This is what is available in the OpsOasis logs:

❌ API Client Error (Pressable): Bad Request - {"request":{"endpoint":"sites\/1258680\/clone","query_params":null,"method":"POST","body_params":"***","headers":null,"timeout":90},"response":{"status_code":400,"headers":{"server":"nginx","date":"Thu, 07 Nov 2024 14:48:59 GMT","content-type":"application\/json; charset=utf-8","content-length":"116","x-frame-options":"SAMEORIGIN","x-xss-protection":"0","x-content-type-options":"nosniff","x-permitted-cross-domain-policies":"none","referrer-policy":"strict-origin-when-cross-origin","access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD","access-control-request-method":"*","access-control-allow-headers":"Origin, X-Requested-With, Content-Type, Accept, Authorization","cache-control":"no-cache","strict-transport-security":"max-age=63072000; includeSubDomains","vary":"Origin","x-req":"iad1:3001:542f31a1-e125-4fe9-bee1-a6c661e5ce60"},"body":"{\"message\":\"There was a problem processing your request.\",\"data\":null,\"errors\":[\"Site name has already been taken\"]}"}}

This is the critical part that should also be added to CLI output to help us quickly debug:
errors\":[\"Site name has already been taken\"]}"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant