Unverified Commit 5b88a4bb authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

station board: fix HTTP status and IRIS error handling

parent 2123a67b
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -935,17 +935,22 @@ sub station {
		}
	)->catch(
		sub {
			my ($err) = @_;
			if ( ref($err) eq 'HASH' ) {
			my ( $err, $status ) = @_;
			if ($status) {
				$self->render(
					'landingpage',
					with_autocomplete => 1,
					with_geolocation  => 1,
					error             => $err->{errstr},
					error             => $status->{errstr},
					status            => 400,
				);
			}
			else {
				$self->render( 'exception', exception => $err );
				$self->render(
					'exception',
					exception => $err,
					status    => 500
				);
			}
		}
	)->wait;