Dashboards: Do not throw error if backend cannot migrate schemaVersion to latest (#102357)
* Refactor migration error handling to use MinimumVersionError for schema version checks - Updated migration logic to return MinimumVersionError instead of MigrationError for outdated schema versions. - Enhanced MinimumVersionError message for clarity on migration constraints. - Added tests for version error handling in the dashboard API to ensure proper error throwing for specific conversion errors. * Fix tests and remove folder dependencies
This commit is contained in:
@@ -27,7 +27,7 @@ func TestMigrate(t *testing.T) {
|
||||
"schemaVersion": schemaversion.MIN_VERSION - 1,
|
||||
}, schemaversion.MIN_VERSION)
|
||||
|
||||
var minVersionErr = schemaversion.NewMigrationError("schema version is too old", schemaversion.MIN_VERSION-1, schemaversion.MIN_VERSION)
|
||||
var minVersionErr = schemaversion.NewMinimumVersionError(schemaversion.MIN_VERSION - 1)
|
||||
require.ErrorAs(t, err, &minVersionErr)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user