fix error handling and align with stratos src changes