Idiomatic way to handle API route errors - SolidJS