func maybeRestoreQuotaLimitError(err error) error {
	if params.IsCodeQuotaLimitExceeded(err) {
		return errors.NewQuotaLimitExceeded(nil, err.Error())
	}
	return err
}
// maybeRestoreQuotaLimitError checks if the server emitted a quota limit
// exceeded error and restores it back to a typed error from juju/errors.
// Ideally, we would use apiserver/common.RestoreError but apparently, that
// package imports worker/uniter/{operation, remotestate} causing an import
// cycle when api/common is imported by api/uniter.
maybeRestoreQuotaLimitError checks if the server emitted a quota limit
exceeded error and restores it back to a typed error from juju/errors.
Ideally, we would use apiserver/common.RestoreError but apparently, that
package imports worker/uniter/{operation, remotestate} causing an import
cycle when api/common is imported by api/uniter.
// maybeRestoreQuotaLimitError checks if the server emitted a quota limit // exceeded error and restores it back to a typed error from juju / errors . // Ideally we would use apiserver / common . RestoreError but apparently that // package imports worker / uniter / { operation remotestate } causing an import // cycle when api / common is imported by api / uniter .
func maybeRestoreQuotaLimitError(err error) error {
	if params.IsCodeQuotaLimitExceeded(err) {
		return errors.NewQuotaLimitExceeded(nil, err.Error())
	}
	return err
}
func maybeRestoreQuotaLimitError ( err error ) error { if params . IsCodeQuotaLimitExceeded ( err ) { return errors . NewQuotaLimitExceeded ( nil , err . Error ( ) ) } return err }
maybeRestoreQuotaLimitError checks if the server emitted a quota limit
exceeded error and restores it back to a typed error from juju/errors.
maybeRestoreQuotaLimitError checks if the server emitted a quota limit exceeded error and restores it back to a typed error from juju / errors .