Skip to content
Permalink
Browse files
[server] Fix incorrect response code used for exception
(cherry picked from commit 3cc2060)
  • Loading branch information
nyalldawson committed Jun 4, 2021
1 parent 79f096c commit 002d76e7a29b598e37502abd916f0ddb728d7f97
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/server/qgsserverapiutils.cpp
@@ -115,13 +115,13 @@ template<typename T, class T2> T QgsServerApiUtils::parseTemporalInterval( const
const QStringList parts { interval.split( '/' ) };
if ( parts.length() != 2 )
{
throw QgsServerApiBadRequestException( QStringLiteral( "%1 is not a valid datetime interval." ).arg( interval ), QStringLiteral( "Server" ), Qgis::Critical );
throw QgsServerApiBadRequestException( QStringLiteral( "%1 is not a valid datetime interval." ).arg( interval ), QStringLiteral( "Server" ) );
}
T result { parseDate( parts[0] ), parseDate( parts[1] ) };
// Check validity
if ( result.isEmpty() )
{
throw QgsServerApiBadRequestException( QStringLiteral( "%1 is not a valid datetime interval (empty)." ).arg( interval ), QStringLiteral( "Server" ), Qgis::Critical );
throw QgsServerApiBadRequestException( QStringLiteral( "%1 is not a valid datetime interval (empty)." ).arg( interval ), QStringLiteral( "Server" ) );
}
return result;
}

0 comments on commit 002d76e

Please sign in to comment.