File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -675,7 +675,9 @@ IdType Value::release<IdType>()
675
675
{
676
676
auto stringValue = std::move (stringData.string );
677
677
678
- return internal::Base64::fromBase64 (stringValue);
678
+ return internal::Base64::validateBase64 (stringValue)
679
+ ? IdType { internal::Base64::fromBase64 (stringValue) }
680
+ : IdType { std::move (stringValue) };
679
681
}
680
682
}
681
683
else if (std::holds_alternative<IdType>(_data))
Original file line number Diff line number Diff line change @@ -674,14 +674,7 @@ response::IdType ModifiedArgument<response::IdType>::convert(const response::Val
674
674
throw schema_exception { { " not an ID" } };
675
675
}
676
676
677
- try
678
- {
679
- return response::Value { value }.release <response::IdType>();
680
- }
681
- catch (const std::logic_error& ex)
682
- {
683
- throw schema_exception { { ex.what () } };
684
- }
677
+ return response::Value { value }.release <response::IdType>();
685
678
}
686
679
687
680
void blockSubFields (const ResolverParams& params)
@@ -852,15 +845,6 @@ void ModifiedResult<response::IdType>::validateScalar(const response::Value& val
852
845
{
853
846
throw schema_exception { { R"ex( not a valid ID value)ex" } };
854
847
}
855
-
856
- try
857
- {
858
- value.get <response::IdType>();
859
- }
860
- catch (const std::logic_error& ex)
861
- {
862
- throw schema_exception { { ex.what () } };
863
- }
864
848
}
865
849
866
850
template <>
You can’t perform that action at this time.
0 commit comments