src/store/modules/schemas.js
/**
   * Fetch the config for the given subject.
   * If a config is not set or found is a 404 thrown.
   * @param  {String} subject        Subject name
   */
Fetch the config for the given subject.
If a config is not set or found is a 404 thrown.
@param  {String} subject        Subject name
Fetch the config for the given subject . If a config is not set or found is a 404 thrown . @param { String } subject Subject name
async fetchConfig ({commit}, subject) {
    try {
      const {data} = await clusters.request(CLUSTER_SCHEMA_REGISTRY, {
        accept: SCHEMA_CONTENT_JSON
      }).get(`/config/${subject}`)
      const config = {
        compatibility: data.compatibilityLevel
      }
      commit('setConfig', {
        subject,
        config
      })
    } catch (error) {
      const {response} = error
      if (response.status !== 404) {
        throw error
      }
    }
  }
async fetchConfig ( { commit } , subject ) { try { const { data } = await clusters . request ( CLUSTER_SCHEMA_REGISTRY , { accept : SCHEMA_CONTENT_JSON } ) . get ( ` ${ subject } ` ) const config = { compatibility : data . compatibilityLevel } commit ( 'setConfig' , { subject , config } ) } catch ( error ) { const { response } = error if ( response . status !== 404 ) { throw error } } }
Fetch the config for the given subject.
Fetch the config for the given subject .