This what appears on all admin pages after an "error" has been logged — which is currently only done for shipping and tax rate retrieval/calculation errors:

How can this notice be improved upon to be more informative? Currently, it links to the status page (indirection level 1), where the logs can be found but only once you scroll past the other status views (indirection level 2). Note that plugin version 1.12 has a bug in which the message could appear without logs being written, but it is fixed in master and unrelated to this issue.
Also note: it seems in practice there is a quite a typical scenario in which this notice will appear, which is missing product weight and/or dimensions — https://github.com/Automattic/woocommerce-services/pull/1288 seeks to preempt this case, while https://github.com/Automattic/woocommerce-services/pull/1303 made this error accessible from the front-end, making the admin notice relatively less useful.
Lower priority, but another possible improvement is to the dismiss button triggering a page load:

I ran into this today when setting up a test site. Took me a while to figure out what was happening. Turns out it was because my product didn't have dimensions and weight. We need to fix this problem more holistically (ie. someone shouldn't be able to save a physical product without adding weight and dimensions), but a quick win would be to surface that particular problem in the error message itself. Right now, you have to dig through the logs to see that weight and dimensions need to be added.
Opened https://github.com/Automattic/woocommerce-services/pull/1380 specifically to improve the messaging around missing weight.
Note that missing dimensions (as I've finally realized) don't cause an error AFAICT — the dimension value is just treated as 0.
Is there any special reason to log "An error occurred in WooCommerce Services" when someone enters an incorrect billing / shipping address at the checkout? Here is what I got when ZIP code didn't match the state:
05-23-2018 @ 03:19:53 - Error retrieving the tax rates. Received (400): {"error":"Bad Request","detail":"to_zip 34691 is not used within to_state DE","status":400} (WCS Tax)
The customers can enter all sorts of mistakes in the address, and raising an alarm in WP Admin is probably not the best way to handle this.
Reported in 1176977-zen
Something I have noticed is that this error will persist if not dismissed even after the "problem" is resolved.
Here is a handy gif showing this.
Pinging @bor0 since we have a ticket 1176977-zen that's back on top of the queue.
@dechov any updates for this one? Coming from 1176977-zen too.
With #1380 merged, is there any error messages need to be refined before closing this issue?
Yes, ideally we would rework the verbiage in this admin notice, either replacing it with an indication of the relevant specific error(s), or at least making it crystal clear that it's referring only to the _logs_ and not the status indicators above.
This issue doesn't necessarily challenge the notion that an admin notice is warranted when an error occurs, but 1176977-zen exposes the fact that an error is being logged in at least one case when the customer inputs inconsistent information and there is no action to be taken by the merchant. I've now documented this particular case in https://github.com/Automattic/woocommerce-services/issues/1427#issuecomment-415591742.
Since we've made enhancements around this issue for product weights and customer-triggered errors (and have an issue open for dimensions), can we re-scope this to be a removal of the generic "an error occurred" notice?
_cc: @v18_
@jeffstieler I think that if we can figure out why sometimes the error message persists after the user clicks on the here link, and fix that, that would be best.
Do you remember the historical reasons for displaying this error for every log? Are those reasons fully resolved now? Will customers potentially miss noticing problems with their shipping if we remove the generic message entirely? @shaunkuschel - what are your thoughts?
cc also @joelwills and @juliaamosova - before we fix this issue by removing the generic error message, do you have any other concerns?
Do you remember the historical reasons for displaying this error for every log?
It was introduced in https://github.com/Automattic/woocommerce-services/pull/803, and we were only logging errors with the shipping rates request. At the time it was the only place we surfaced rate request errors, which included missing dimension errors.
Are those reasons fully resolved now?
I'd say the actionable errors (missing product info) are either resolved or represented in different issues that we're tackling as part of this effort.
Will customers potentially miss noticing problems with their shipping if we remove the generic message entirely?
I don't think so. The biggest cause of these admin notices are request errors with tax or shipping requests, which can be caused by API outages on the USPS or TaxJar side. There's really nothing to be done in these cases, so I don't think the generic message is helpful.
Will customers potentially miss noticing problems with their shipping if we remove the generic message entirely?
Nah, I think we should be fine to remove that message. It tends to confuse customers more than it helps them, and we can just be more clear about where to find the logs in the docs or something- should there actually be a problem.
Awesome! :)
Most helpful comment
Nah, I think we should be fine to remove that message. It tends to confuse customers more than it helps them, and we can just be more clear about where to find the logs in the docs or something- should there actually be a problem.