title: DioError [DioErrorType.RESPONSE]: Http status error [500], why?
body: <p>I'm new to flutter, I use Dio in my project to make Members Register features.. but everytime I execute the register process, the Debug Console give me this error</p>
  <pre><code>I/flutter (13428): Instance of 'FormData'
  I/flutter (13428): DioError [DioErrorType.RESPONSE]: Http status error [500]
  </code></pre>
  <p>however, when I tried to register with POSTMAN, It was a success. So I'm not sure where the problem is.. here's my code, could you guys please help me? i've been stuck on this for weeks..</p>
  <pre><code>final String url = &quot;https://api.censored.org/api/members/register&quot;;
  
  Dio.FormData formData = Dio.FormData.fromMap({
    &quot;nama_lengkap&quot;: name,
    &quot;tempat_lahir&quot;: tempatlahir,
    &quot;tanggal_lahir&quot;: selectedDate.toString(),
    &quot;email&quot;: email,
    &quot;password&quot;: password,
    &quot;username&quot;: username,
    &quot;nomor_ktp&quot;: noKTP,
    &quot;alamat_ktp&quot;: alamatktpmember,
    &quot;alamat_domisili&quot;: alamatmember,
    &quot;pekerjaan&quot;: pekerjaanmember,
    &quot;alamat_pekerjaan&quot;: alamatperusahaanmember,
    &quot;no_whatsapp&quot;: noWAmember,
    &quot;no_hp&quot;: noteleponmember,
    &quot;nama_pemilik_rekening&quot;: namarekmember,
    &quot;nomor_rekening&quot;: norekmember,
    &quot;bank_id&quot;: _valBank,
    &quot;aggrement&quot;: _eulargprogramming,
  
    //Foto
    &quot;foto_ktp&quot;: await Dio.MultipartFile.fromFile(_fotoKtp.path),
    &quot;selfie_dengan_ktp&quot;: await Dio.MultipartFile.fromFile(_fotoSelfie.path),
    &quot;foto_kk&quot;: await Dio.MultipartFile.fromFile(_fotoKK.path),
    &quot;foto_pengenal_lainnya&quot;:
        await Dio.MultipartFile.fromFile(_fotoKartu.path),
    &quot;foto_buku_rekening&quot;:
        await Dio.MultipartFile.fromFile(_fotoRekening.path),
    &quot;foto_profil&quot;: await Dio.MultipartFile.fromFile(_fotoSelfie.path),
  
    //Array
    &quot;penjamin&quot;: {
      &quot;stakeholder_id&quot;: _subrgProgramming1,
      &quot;nama&quot;: penjaminNama,
      &quot;nomor_ktp&quot;: penjaminNoktp,
      &quot;alamat_ktp&quot;: penjaminAlamat,
      &quot;alamat_domisili&quot;: penjaminDomisili,
      &quot;no_hp&quot;: notelppenjamin,
    },
    &quot;sosial_media&quot;: [
      {
        &quot;sosial_media_id&quot;: _sosmedrgprogramming,
        &quot;nama&quot;: sosialmediamember,
        &quot;screenshot&quot;: await Dio.MultipartFile.fromFile(_fotoSosmed.path),
      }
    ],
    &quot;saudara_kerabat&quot;: [
      {
        &quot;stakeholder_id&quot;: 4,
        &quot;nama&quot;: namasaudara,
        &quot;no_hp&quot;: notelpsaudara,
      },
      {
        &quot;stakeholder_id&quot;: 5,
        &quot;nama&quot;: namakerabat1,
        &quot;no_hp&quot;: notelpkerabat1,
      },
      {
        &quot;stakeholder_id&quot;: 5,
        &quot;nama&quot;: namakerabat2,
        &quot;no_hp&quot;: notelpkerabat2,
      },
      {
        &quot;stakeholder_id&quot;: 5,
        &quot;nama&quot;: namakerabat3,
        &quot;no_hp&quot;: notelpkerabat3,
      }
    ],
  });
  print(formData);
  var res;
  try {
    Dio.Dio doo = Dio.Dio();
    doo.options.headers['Accept'] = 'application/json';
    doo.options.contentType = 'application/json';
    doo.options.followRedirects = false;
    Dio.Response response = await doo.post(url, data: formData);
  
    if (response.statusCode == 200) {
      print(response.data);
      res = response;
      final data = jsonDecode(res.body);
      print(res);
  
      int regvalue = data['value'];
      String message = data['message'];
      if (regvalue == 1) {
        setState(() {
          Navigator.pop(context);
        });
        print(message);
        registerToast(message);
      } else if (regvalue == 2) {
        print(message);
        registerToast(message);
      } else {
        print(message);
        registerToast(message);
      }
    }
  } on Dio.DioError catch (e) {
    if (e.response.statusCode == 422) {
      print(e.response.data);
    }
  } on Dio.DioError catch (e) {
    if (e.response.statusCode == 500) {
      print(e.response.data);
    }
  }
  
  
  }
  
    registerToast(String toast) {
      return Fluttertoast.showToast(
          msg: toast,
          toastLength: Toast.LENGTH_SHORT,
          gravity: ToastGravity.BOTTOM,
          timeInSecForIos: 1,
          backgroundColor: Colors.red,
          textColor: Colors.white);
    }
  </code></pre>